home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 015a / dosimp10.zip / SIMPLY3.HYP < prev    next >
Text File  |  1991-08-12  |  105KB  |  1,906 lines

  1.                             The |TAPPEND|T Command
  2.  
  3. This command is a TSR that works just like the PATH command, only for
  4. data files instead of executable files.  If your current directory is
  5. C:\WORD and you want to do something with the file C:\WORD\LETTER.DOC,
  6. that's easy.  You just say LETTER.DOC.  But if C:\WORD is not the |ncurrent|n
  7. |ndirectory|n, then you have to say \WORD\LETTER.DOC in order to access that
  8. file.  Well this is no longer the case, ever since the |nAPPEND|n command
  9. came on the scene in DOS version 3.2.  If you had previously issued the
  10. command |nAPPEND|n C:\WORD then you can just say LETTER.DOC, no matter what
  11. your |ncurrent|n |ndirectory|n is, and DOS will be able to find the file.
  12.  
  13. There is a big problem with this though.  DOS can use the |nAPPEND|n method
  14. to find the file, but it can't use it to write the file back to disk.  So
  15. if any changes are made to the file after it has been found via the AP-
  16. PEND method, the new copy of the file will be written into the |ncurrent|n
  17. |ndirectory|n.  The original copy of the file is still right where it was,
  18. only without today's changes.  Now if you make some more changes to the
  19. file tomorrow, and you had started from some other |ndirectory|n, then by the
  20.                            <page down> for more
  21.                              APPEND continued
  22. end of tomorrow you'll have three copies of your LETTER.DOC file sitting
  23. on your disk, but all three of them are incomplete.  You still have the
  24. original copy in the C:\WORD directory, but it is missing yesterday's and
  25. today's changes.  Then you have the copy that was created yesterday, that
  26. has yesterday's changes but not today's changes.  And finally you have
  27. today's copy, which is the original with today's changes, but not yester-
  28. day's changes.  Three copies of the same file, in three different direc-
  29. tories, and all of them are wrong.  So what's so great about the |nAPPEND|n
  30. command?
  31.  
  32. Well it does have its uses, but you just have to think for a minute about
  33. what you're doing, before you use it.  First, you'll need to find out for
  34. sure which files on your disk ever get modified.  See, you're not the on-
  35. ly one who ever modifies your files.  Your programs do some modifying of
  36. their own files from time to time.  So to find out, do a complete BACKUP,
  37. which turns off the Archive attributes for all your files, then use your
  38. computer normally for a couple weeks, and then do this:
  39.           |nATTRIB|n \*.* /S || |nFIND|n " A " > |nPRN|n
  40.                            <page down> for more
  41.                              APPEND continued
  42. That will send, to your printer, a list of every file on the disk that
  43. has been modified since the backup.  (See the sections on ATTRIB, FIND,
  44. Redirection, and PRN to find out how it works.)  Make sure to leave a
  45. <Space> on each side of the A inside the quotes, or it won't work.
  46.  
  47. You never want to put the directories that contain these changeable files
  48. on your |nAPPEND|n command line.  But you can use it for any directory that
  49. doesn't contain changing files.  Suppose you keep all your word procces-
  50. sor's program files in your C:\WORD |ndirectory|n, and you keep all the doc-
  51. uments that you create with your word processor, in a subdirectory called
  52. C:\WORD\DOCS.  Suppose also that none of the files in your C:\WORD direc-
  53. tory came up on that list of changeable files.  Then you can put the C:\
  54. WORD |ndirectory|n on your PATH, and also on your |nAPPEND|n line.  And you can
  55. change to your C:\WORD\DOCS |ndirectory|n (with the CHDIR command) before
  56. each time you start your word processor.  This way, all the files you
  57. might change with the word processor are in the current |ndirectory|n, so
  58. they'll get written back to the proper place, but you can still access
  59. the word processor's executable files (via the PATH) and it can access
  60. its |soverlay|ss (via the |nAPPEND|n line), and everybody will be happy.
  61.                             The |TASSIGN|T Command
  62.  
  63. Here's a command you won't be using too often.  It is a TSR that is used
  64. to change all references to one drive, to another drive.  This is useful
  65. for installing programs that insist on being installed from a disk in
  66. drive A:.  Well, what if you got the software on 3.5" disks, and your
  67. 3.5" drive is drive B:?   Here's where the |nASSIGN|n command comes in.  If
  68. you were to issue the command |nASSIGN|n A=B then every time the installation
  69. program requests a read from drive A:, DOS will send the program to drive
  70. B: instead and you will probably be able to install that software without
  71. any trouble.
  72.  
  73. This command is not all roses, though.  It can be very dangerous!  Don't
  74. use it unless you have a complete backup of your hard drive as well as any
  75. floppies you may be using while the |nASSIGN|n command is in effect.  Then,
  76. disable the assignment just the second you're done with whatever you were
  77. doing that required the assignment.  To do that, just enter |nASSIGN|n with
  78. no parameters.
  79.  
  80.                            <page down> for more
  81.                              ASSIGN continued
  82. That really is not just hot air.  Don't leave an assignment active for
  83. one single minute longer than you have to.  All sorts of terrible things
  84. can happen.  Some DOS commands or programs might ignore the assignment,
  85. and perform the specified command on the A: disk when you meant for the
  86. command to happen to the B: drive.  On the other hand, if you forget that
  87. you have an assignment made, and perform some command that does not ig-
  88. nore the assignment, you'll end up once again having that command per-
  89. formed on the wrong disk.  For example, what if after you've given the
  90. command |nASSIGN|n A=C, then you forget that you've done that, and put a disk
  91. into drive A: and enter |nDEL|n A:*.*?  Know what's going to happen?  All the
  92. files in the current directory of drive C: will be deleted.
  93.  
  94. And any TSR that is resident while an |nASSIGN|n is active, including DOS's
  95. PRINT command, can do some serious damage to your data.  And if you goof
  96. up and use DOS's BACKUP command on an assigned drive, it might act like
  97. it's working, but when you go to RESTORE the |nbackup|n disks, you may find
  98. that your |nbackup|n |ndisks|n are worthless.
  99.  
  100.                            <page down> for more
  101.                              ASSIGN continued
  102. If for any reason you find that you need to use the |nASSIGN|n command on a
  103. regular basis to make one particular application work with your setup, do
  104. it from a batch file.  Have the |nbatch file|n make the assignment, then run
  105. the app, and then undo the assignment.  That way you'll never forget to
  106. unassign, because the |nbatch file|n always remembers for you.
  107.  
  108. If you already have one assignment made, and you issue another |nASSIGN|n
  109. command to make another assignment, the second one will cancel the first
  110. one.  But you can make two assignments with one |nASSIGN|n command, so that's
  111. ok.  Just do something like |nASSIGN|n A=C B=C.
  112.  
  113. Notice that this command is one of the only times where you are supposed
  114. to reference a drive letter without using a colon (:).  |nASSIGN|n A=B is
  115. correct, but |nASSIGN|n A:=B: is not.
  116.  
  117. If you have DOS version 3.1 or later, use the SUBST command instead of
  118. |nASSIGN|n.  It's not the safest command in the world either, but it's sure
  119. safer than |nASSIGN|n!  If you have the |nSUBST|n command you should just delete
  120.                            <page down> for more
  121.                              ASSIGN continued
  122. the |nASSIGN|n.COM file from your hard drive so you don't forget and use it.
  123.  
  124. DOS version 5 adds the /STATUS switch to this command.  If you enter the
  125. command |nASSIGN|n /STATUS then DOS will tell you what ASSIGNments you've
  126. made, that are still active.
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.                              The |TBREAK|T Command
  142.  
  143. Here's a command that's not used very often.  What it does, is to turn
  144. break checking on and off.  The default is off, so the only time you need
  145. to use it is to turn it on, or to turn it off if you'd previously turned
  146. it on.
  147.  
  148. So what is break checking?  Well you can press the <Ctrl-Break> keystroke
  149. combination to break out of a program that's running, if you decided you
  150. didn't want to do it after all, or if it seems that something in the pro-
  151. gram has gone wrong.  Well if break is off, then DOS will only look to
  152. see if you have pressed <Ctrl-Break> each time an I/O operation is
  153. performed.  That means when the program is looking for input from the
  154. keyboard or serial port, or when the program is sending output to the
  155. screen, printer, or serial port.  However, if break is on, then DOS will
  156. check the |nkeyboard|n buffer for a <Ctrl-Break> keystroke every single time
  157. the program makes any DOS function call.  This includes when the program
  158. is writing to disk, and all sorts of things.  To put it simply, |nBREAK|n ON
  159. makes it so that you can break out of a program a lot more easily, but of
  160.                            <page down> for more
  161.                               BREAK continued
  162. course it slows your system down because DOS has to take time to check
  163. the keyboard buffer a lot more often.  Another bad thing about having
  164. |nBREAK|n on is that if you break out of a disk write, that disk's FAT can
  165. get trashed.
  166.  
  167. |nBREAK|n OFF puts the break setting back to normal, which means that break
  168. checking will occur more seldom and the system will not be slowed down
  169. by checking for break so often.  The command |nBREAK|n all by itself, with
  170. no on or off parameters, will just report the |ncurrent|n state of break.
  171.  
  172. All this applies to the <Ctrl-C> keystroke combination as well.  It's
  173. basically the same thing.
  174.  
  175. This command can also be used in the CONFIG.SYS file if desired.  In
  176. which case you use an equals sign (=) between the command and the para-
  177. meter, as in BREAK=ON.  Of course BREAK=OFF would never be needed in the
  178. |nCONFIG.SYS|n file because |nBREAK|n is always off every time you reboot, until
  179. such time as a |nBREAK|n ON command is issued.
  180.  
  181.                             The |TBUFFERS|T Command
  182.  
  183. This command can only be used in your CONFIG.SYS file.  It tells DOS how
  184. many disk buffers to set up if you don't want to use the default.  A disk
  185. buffer is just like a very small cache with no look-ahead.  So if you're
  186. using a disk |ncache|n, you want to use a very small number of buffers, such
  187. as 5.  (Certainly not 0, though.)  If not, use the largest one that the
  188. installation manuals for your applications say.  If one manual tells you
  189. that app needs 25, and the manual for another app says 30, then use 30.
  190.  
  191. The syntax for the |nBUFFERS|n command is like this:
  192.           BUFFERS=AA,BB /X
  193. The "AA" parameter in that example, is the number of buffers DOS should
  194. set up.  Each buffer takes 528 bytes of memory, to store 512 |nbytes|n of
  195. disk data.
  196.  
  197. If you're using conventional or high |nmemory|n for the buffers, you can have
  198. anywhere from 1 to 99 of them.  If you have a DOS version earlier than
  199. 3.3, the |ndefault|n is 2.  If your DOS is 3.3 or later, then your |ndefault|n
  200.                            <page down> for more
  201.                              BUFFERS continued
  202. number of buffers depends on your hardware.  If you have more than 256K
  203. of RAM, then it's 10.  Or if you have over 512K, it's 15.
  204.  
  205. If you have DOS version 4.0 or later, then you can use the BB parameter
  206. in that example to specify the number of look-ahead sectors.  (See the
  207. section on Cache for what that means.)  This parameter is optional, but
  208. if you want any look-ahead sectors, you can use anywhere from 2 to 8, and
  209. they each take up 512 bytes of |nRAM|n.  If you're using a real disk |ncache|n,
  210. then leave this parameter at the default, which is no look-ahead.
  211.  
  212. Another thing you can do, but only if you have DOS version 4, is to place
  213. your buffers into expanded memory if you have it, to keep them from using
  214. up your conventional |nmemory|n.  Of course if you do that, you have to put
  215. the BUFFERS= line in your CONFIG.SYS file later than the line that loads
  216. your |nexpanded|n |nmemory|n manager.  Anyway, |nexpanded|n |nmemory|n is what the /X
  217. parameter is for in the |nBUFFERS|n command.  And you are allowed up to ten
  218. thousand of them, instead of the normal limit of 99.
  219.  
  220.                            <page down> for more
  221.                              BUFFERS continued
  222. Now in DOS version 5.0, if you have one meg of RAM so that you can load
  223. DOS into the High Memory Area, then the buffers go up there too, with the
  224. rest of the DOS kernel.  That is, if there is room for all of them.  See,
  225. if you specify a number so large that they can't all fit up there the way
  226. it is, like 46 for example, there is one small section of the DOS kernel
  227. that can come back down to conventional |nmemory|n to allow that huge chunk
  228. of buffers to go |nhigh|n.  Or if you use an even larger number, like 50, so
  229. that they won't fit up there even with that little piece of DOS coming
  230. back down, then the buffers will all stay in |nconventional|n |nmemory|n.  But if
  231. you specify just the right amount, like 36 to 44 (it differs on different
  232. computers), then all of the buffers can go |nhigh|n, and all of the DOS ker-
  233. nel can stay |nhigh|n too and you don't lose a byte of |nconventional|n |nmemory|n,
  234. whether you use that large number of buffers, or a low number like 5.
  235.  
  236. Anyway, once you get up over 40 buffers, it takes DOS about as long to
  237. search all those buffers for the required data as it would to just get it
  238. from the hard drive, so having that many buffers can actually slow your
  239. system down.
  240.                            <page down> for more
  241.                              BUFFERS continued
  242. The reason for trying to keep the number of buffers low in earlier ver-
  243. sions of DOS, was to save memory.  But since in DOS 5, you can specify a
  244. much larger number of buffers without eating up a speck of conventional
  245. |nmemory|n, there's no reason to keep the number low anymore.  Remember that
  246. for DOS to access a cache in expanded |nmemory|n, that involves a transfer
  247. across the data bus, which is slow, and to access a |ncache|n in extended
  248. |nmemory|n, that involves the CPU switching into protected mode, which is
  249. slow, but for DOS to access buffers in the high |nmemory|n area, no slowdown
  250. is involved.  Therefore, it is no longer quite so sensible to have a low
  251. number of buffers just because you're using a disk |ncache|n.  Because access
  252. to the data in the buffers will be faster than access to the |ncache|n.  Be-
  253. sides, since caches monitor what data stays in the |ncache|n when it starts
  254. to overflow, it's possible that some data which is not requested often
  255. enough for the |ncache|n to hold it, might be in the buffers because the
  256. buffers only keep the most recently-read info, not just the most fre-
  257. quently requested info.  So since nothing else besides the DOS kernel
  258. and the buffers can go into the |nHigh|n |nMemory|n Area if DOS is using that
  259. space, you may as well fill that space up with buffers if you feel like
  260. it.
  261.                              The |TCALL|T Command
  262.  
  263. This is a batch file command, which has almost no use at the DOS prompt.
  264. It only exists in DOS versions 3.3 and later.  Before that, it was neces-
  265. sary to use the COMMAN|1D command to accomplish the same thing.  What it
  266. does is to run another |nbatch file|n from within a |nbatch file|n, and still re-
  267. turn to the calling |nbatch file|n after the called |nbatch file|n is completed.
  268.  
  269. Usually if you run one |nbatch file|n from within another one, when the sec-
  270. ond one finishes it just gives you back a DOS |nprompt|n, without ever re-
  271. turning to finish the rest of the |nbatch file|n from which it was run.  The
  272. |nCALL|n command takes care of that problem.
  273.  
  274. Another thing about the |nCALL|n command is that if ECHO was off in the call-
  275. ing |nbatch file|n, then |nECHO|n will remain off in the called |nbatch file|n.  So
  276. the second one doesn't have to have |nECHO|n OFF as its first line.  But if
  277. you want |nECHO|n to be on in the called |nbatch file|n, then its first line has
  278. to be |nECHO|n ON, even though that's the default for any |nbatch file|n and it
  279. doesn't normally have to be specified.  But |nECHO|n will still be off in the
  280.                            <page down> for more
  281.                               CALL continued
  282. calling batch file, when you get back to it.
  283.  
  284. The called |nbatch file|n gets its own copy of the environment so it has the
  285. same PATH, PROMPT, COMSPEC, and anything else that's in the original en-
  286. vironment, but any variables changed during the called |nbatch file|n will
  287. not be returned to the calling |nbatch file|n.  The calling |nbatch file|n keeps
  288. the exact same |nenvironment|n that existed before the second |nbatch file|n was
  289. called.
  290.  
  291. You can use replaceable parameters in a called |nbatch file|n also.  Just
  292. enter the |nparameters|n on the |nCALL|n command line, like this:
  293.           |nCALL|n BATCH2 ONE TWO THREE
  294. This command would run the BATCH2.BAT file, with ONE as %1, TWO as %2,
  295. and THREE as %3.
  296.  
  297. You can also call a |nbatch file|n that is not in the current directory, or
  298. on the |nPATH|n, by specifying its full pathname like this:
  299.           |nCALL|n C:\BELFRY\BATCH2
  300.                            <page down> for more
  301.                               CALL continued
  302. If you use |nCALL|n (or |nCOMMAND|n /C) to run a second batch file from within a
  303. first one, then as soon as the second |nbatch file|n is done, the first batch
  304. file will continue right where it left off, at the line right after the
  305. |nCALL|n (or |sCOMMAN|1D|s) command.
  306.  
  307. Of course you can still use the |nCOMMAND|n /C technique even if you have DOS
  308. version 3.3 or later, but it's almost always more efficient to use |nCALL|n.
  309.  
  310. There is one situation in which it is useful to use this command at the
  311. DOS prompt, rather than in batch files, and that has to do with the FOR
  312. command.
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.                               The |TCLS|T Command
  322.  
  323. This is the easiest DOS command there is.  It CLears the Screen of any
  324. data that might be on it, and puts the prompt and the cursor up in the
  325. top left corner (called the "home" position).  No parameters, no syntax
  326. to learn, just |nCLS|n.
  327.  
  328. It's used mostly in a batch file, to clear up any unnecessary messages
  329. that may have been left on the screen.  It's also needed in many cases
  330. if you're using the |nPROMPT|n command with ANSI.SYS ESC sequences to change
  331. your screen colors.  Because a new ANSI color changing command does not
  332. affect the whole screen, only whatever gets put on the screen after the
  333. command is issued.  Also a lot of programs will reset your screen to some
  334. other colors, so your chosen colors are gone when you exit from such an
  335. application.  In many cases a simple |nCLS|n command will bring them back.
  336.  
  337. If |nANSI.SYS|n is installed, |nCLS|n works by sending ESC[2J to the screen.
  338. This is the ANSI command that clears the screen.  If for any reason you
  339. can't get the |nCLS|n command to work, try installing |nANSI.SYS|n with a DEVIC|1E
  340.                            <page down> for more
  341.                                CLS continued
  342. command in your CONFIG.SYS file.
  343.  
  344. One interesting tidbit of information, about the fact that DOS sends the
  345. ANSI.SYS ESC sequence 2J to the screen in order to execute this command,
  346. is that it's an easy way to get the ESC character into a file, for use
  347. in your own ANSI ESC sequences.  If you enter the command |nCLS|n > FILE.TXT
  348. (see also |sRedirection|s) then instead of the screen clearing, a file will
  349. be created that says ESC[2J only instead of ESC, it will actually contain
  350. the ESC character, which looks like a little arrow.  Now you can edit the
  351. file to replace the 2J with whatever ESC sequence you want.
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.                              The |TCOMP|T Command
  362.  
  363. This command is used to COMPare two files.  The syntax is really simple:
  364.           |nCOMP|n D:\DIR\FILE1.EXT D:\DIR\FILE2.EXT
  365. Where D: is the drive letter for each file, and |nDIR|n is the directory for
  366. each file, and FILE#.EXT are the names and extensions of the files that
  367. you want to compare to each other.
  368.  
  369. The command compares each byte of the first file, with each byte of the
  370. second file, in order, and if there are ten mismatches, the command will
  371. abort itself.  If there are less than ten differences, they will be dis-
  372. played on the screen.  The format of the display is not very friendly,
  373. however.  It will say something like "Compare error at offset 3 |nFile 1|n =
  374. 44 |nFile 2|n = 64".  That means that the fourth byte of the first file is a
  375. capital D, and the fourth byte of the second file is a lowercase d.  Why
  376. does it mean that?  Well the offset means how many bytes past the first
  377. one, so offset 3 = byte 4.  And the 44 and 64 are the hexadecimal values
  378. for the ASCII characters D and d.  If your version of DOS has the FC
  379. command, you will usually want to use it instead of the |nCOMP|n command.
  380.                            <page down> for more
  381.                               COMP continued
  382. It's much more friendly.  But if you're in a hurry, |nCOMP|n is much faster.
  383.  
  384. If the files have different byte sizes, the |nCOMP|n command won't even try
  385. to compare them.
  386.  
  387. Some computer manufacturers that put out their own slightly different
  388. versions of DOS include a |nCOMP|n command that's slightly different than the
  389. way I've described it.  My description is for regular PC-DOS or MS-DOS
  390. so yours could be a bit different, but it should have the same usage and
  391. syntax.
  392.  
  393. One way in which this command is really useful despite its unfriendliness
  394. is for copying really important files.  It is possible (although rare!)
  395. for a computer to make a mistake, so you can just use the |nCOMP|n command on
  396. the source and target files, after a COPY command, to be absolutely sure
  397. that the copy was made perfectly.
  398.  
  399. You can use wildcards with this command, too.  If you want to compare
  400.                            <page down> for more
  401.                               COMP continued
  402. every .BAT file on drive C: with each file of the same name on drive A:,
  403. |nCOMP|n C:*.BAT A:\*.* will do it.  Since the second filename was specified
  404. with *.* the command will just look for files with the same names.
  405.  
  406. MS-DOS version 5 brings good news to the |nCOMP|n command.  It has some swit-
  407. ches that make it a lot friendlier.  The /D switch will display the dif-
  408. ferences in decimal ASCII code instead of in hex numbers.  The /A switch
  409. will actually show the characters instead of codes.  /L will show the
  410. line number of the mismatch instead of the byte offset.  And the /N=#
  411. switch will compare the first # lines of the files even if the byte size
  412. of the files do not match.  Finally, the /C switch makes a non-case-sen-
  413. sitive comparison.  In other words, D and d will not be regarded as a
  414. mismatch.
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.                              The |TCOPY|T Command
  422.  
  423. This is the command you use to make a copy of one file and put that copy
  424. somewhere else.  The original file stays right where it was before.  The
  425. syntax is pretty straightforward:
  426.           |nCOPY|n D:\DIR\FILE1.EXT D:\DIR\FILE2.EXT
  427. where D: is the drive letter for the original source file and the drive
  428. letter for the copy on the target drive.  |nDIR|n is the directory for the
  429. original source file and the |ndirectory|n for the copy on the target drive.
  430. And FILE#.EXT is the filename and extension for the original source file
  431. and the filename and extension for the copy on the target drive.
  432.  
  433. Most of those parts of the command can usually be left out though.  If
  434. the source file is in the current |ndirectory|n of the |ncurrent|n drive, then
  435. the first D:\DIR\ part can be left out.  (COPY FILE1.EXT D:\DIR\FILE2
  436. .EXT)  If the copy of the file that is to be placed on the target drive
  437. is to have the same filename and extension as the source file, then the
  438. FILE2.EXT part can be left out.  (COPY D:\DIR\FILE1.EXT D:\DIR)  If the
  439. |ncurrent|n drive and |ndirectory|n are the target, and the filename and exten-
  440.                            <page down> for more
  441.                               COPY continued
  442. sion are to remain the same as the source, then the entire target half
  443. of the equation can be left out.  (COPY D:\DIR\FILE1.EXT)
  444.  
  445. Target files always start out with their Archive attributes set to on,
  446. because they have just been created.  But even if the source file had a
  447. Read-only attribute, the target file will not.  You'll have to use the
  448. ATTRIB command to set the R attribute of the target file if you want to.
  449.  
  450. The |nCOPY|n command can also be used to combine two or more files into one.
  451. This is called |tconcatenation|t, but it doesn't always work quite right in
  452. all DOS versions.  Always take a look at the target file, and make sure
  453. that it does contain each of the source files, before you even think
  454. about deleting the source files!
  455.  
  456. Here are some examples of |nconcatenation|n:
  457.           |nCOPY|n FILE1 + FILE2 BIGFILE
  458.           |nCOPY|n FILE* BIGFILE
  459.           |nCOPY|n FILE1 + FILE2
  460.                            <page down> for more
  461.                               COPY continued
  462. That last one will use the first file specified, FILE1, as the target.
  463. FILE2 will be appended to the end of FILE1.  FILE1 will no longer exist
  464. in its original form, so be careful with that!
  465.  
  466. It's a good idea to make a quick |nbackup|n copy of each of the files you're
  467. about to concatenate, before you start.  Like this:
  468.           |nCOPY|n FILE* FILE*.BAK
  469.           |nCOPY|n FILE1 + FILE2
  470.  
  471. If the files you're trying to concatenate end with <Ctrl-Z>, which is the
  472. ASCII decimal 26, or End-of-File character, then the TYPE command will
  473. show only the first source file when you |nTYPE|n the target file.  That's
  474. because the |nTYPE|n command stops when it finds the first <Ctrl-Z> charac-
  475. ter.  A lot of other sorts of programs do the same thing.  It will look
  476. as if the concatenation didn't work at all.  What to do about that?  Well
  477. you can use the /A switch with the copy command, on the source side of
  478. the equation, as in |nCOPY|n FILE* /A BIGFILE.  This will cause the files to
  479. be copied up to, but not including, their first <Ctrl-Z> characters.  (If
  480.                            <page down> for more
  481.                               COPY continued
  482. there's more than one of these characters in a file, though, whatever
  483. comes after the first one will be lost.)
  484.  
  485. The /A switch on the target side of the equation will cause a <Ctrl-Z> to
  486. be added to the end of the target file.
  487.  
  488. The /A switch is the default for concatenation, but only when DOS real-
  489. izes that |nconcatenation|n is what's going on.  Sometimes you can trick DOS,
  490. you know.  So I just get into the habit of using the /A even when it is
  491. the |ndefault|n, just to make sure DOS realizes that I'm trying to do some
  492. |nconcatenation|n.  There are also times when you want DOS to use the /A
  493. switch when you're not doing |nconcatenation|n at all.  Like if you have a
  494. file that has a <Ctrl-Z> character at the end, and you want to remove
  495. that character, |nCOPY|n /A FILENAME.EXT FILENAME.NEW /B will do it.
  496.  
  497. There is also a /B switch for the |nCOPY|n command, but it's not needed so
  498. often because it is the |ndefault|n unless |nconcatenation|n is being done.  On
  499. the source side, it tells |nCOPY|n to copy the whole file, according to the
  500.                            <page down> for more
  501.                               COPY continued
  502. byte size listed in the file's directory entry, including, and past, any
  503. <Ctrl-Z> characters that may be in the file.  On the target side, the /B
  504. switch causes a <Ctrl-Z> character to not be added to the end of the tar-
  505. get file.
  506.  
  507. An /A or /B switch applies to the file that precedes it, and also to any
  508. files that follow it until the opposite switch is encountered.  So a com-
  509. mand like |nCOPY|n FILE1 /B + FILE2 + FILE3 /A + FILE4 /B BIGFILE would cause
  510. the /B switch to apply to all the files except FILE3.  And |nCOPY|n FILE1 +
  511. FILE2 /B + FILE3 + FILE4 /A BIGFILE would have the /A switch applying to
  512. FILE1, FILE4, and BIGFILE.
  513.  
  514. There is also a /V switch for the |nCOPY|n command, which tells DOS to VERIFY
  515. the copy.  But this doesn't do very much good, and in fact if you use a
  516. disk cache, it doesn't do a bit of good because DOS will end up verifying
  517. the target file against the copy in the |ncache|n, rather than verifying the
  518. target against the source file.  If you want to verify your copy, use the
  519. FC or COMP command instead.
  520.                            <page down> for more
  521.                               COPY continued
  522. Another use for the |nCOPY|n command is to send or receive data to or from a
  523. device, instead of between two filenames.  For example, |nCOPY|n |nCON|n FILENAME
  524. will take data from the keyboard (the input half of the CON device) and
  525. send it to a file.  |nCOPY|n FILENAME /B |nCON|n will display a whole file, even
  526. the parts past the first End-of-File character, to the screen (the output
  527. half of the |nCON|n device).  This is about the only way you can display an
  528. entire .COM or .EXE file on the screen with plain old DOS, because most
  529. display methods stop at the first End-of-File marker.
  530.  
  531. Another device that's really useful with the |nCOPY|n command is PRN.  You
  532. can print out a file with the command |nCOPY|n FILENAME |nPRN|n.  You can even
  533. use |nCOPY|n |nCON|n |nPRN|n to make your printer act sort of like a typewriter.
  534.  
  535. When copying from |nCON|n to a filename or to |nPRN|n, as soon as you enter the
  536. command, the cursor moves down one line and over to the left edge of the
  537. screen, and sits there waiting for you to type something.  You type the
  538. lines of text that you want to send to the file or to |nPRN|n, hitting the
  539. <Enter> key after each line, and when you're all done, hit the <F6> key
  540.                            <page down> for more
  541.                               COPY continued
  542. or the <Ctrl-Z> keystroke combination, hit <Enter> one more time, and
  543. your "file" will be copied to the disk or to the printer.
  544.  
  545. Another use for |nCOPY|n |nCON|n is to add text to the end of a text file without
  546. using a text editor.  |nCOPY|n |nCONFIG.SYS|n + |nCON|n will allow you to add lines
  547. to the end of your CONFIG.SYS file.
  548.  
  549. If you want to "move" some files instead of just copying them it's really
  550. sensible to always use the DIR command first, to make sure the files you
  551. copied really made it to their destination, before you delete the source
  552. files.  Suppose you give the command |nCOPY|n |n*.*|n A:\TEMP to copy all files
  553. in the current directory to the TEMP |ndirectory|n in the root of the disk
  554. in drive A:, and then |nDEL|n |n*.*|n to delete all the files in the |ncurrent|n dir-
  555. ectory now that you have copied them to A:\TEMP.  But guess what?  You
  556. had the wrong disk in the A: drive, and it didn't have a |ndirectory|n named
  557. TEMP on it.  So now what you have is a huge file named TEMP on the disk
  558. in drive A:, which is a concatenation of all those files that you thought
  559. you just copied.  Well they're pretty useless now (unless they were all
  560.                            <page down> for more
  561.                               COPY continued
  562. solid ASCII text) and your source files have already been deleted.  Too
  563. bad.  If you had done a |nDIR|n A:\TEMP command before deleting the source
  564. files, you would have seen that you had one huge file instead of the dir-
  565. ectory that you thought you had, and you could have tried it again.  You
  566. just can't copy files to a directory that doesn't already exist.
  567.  
  568. The |nCOPY|n command won't copy files that are 0 bytes long, but XCOPY will.
  569.  
  570. If you want to change the date and time in a file's |ndirectory|n entry to
  571. the |ncurrent|n date and time on your system clock, without changing the
  572. file, use the command |nCOPY|n FILENAME /B + ,, and the two commas will take
  573. the place of the second source file and the target file, the file will be
  574. copied to itself, the /B ensures that all of the file will be copied, and
  575. since DOS thinks it's doing concatenation, it updates the date and time
  576. of the file's |ndirectory|n entry.
  577.  
  578. If you copy a file to a |ndirectory|n where there is already a file by the
  579. same name, the file you're copying will be copied right over top of the
  580.                            <page down> for more
  581.                               COPY continued
  582. one that was already there, because DOS can only allow one file by a
  583. certain name in each directory.  So before you copy a file, make sure
  584. you're not going to overwrite a file that already exists by that name
  585. in the target |ndirectory|n!  And this especially applies to the use of
  586. the |nCOPY|n |nCON|n command!  So many people will advise you to use that com-
  587. mand to write an AUTOEXEC.BAT or CONFIG.SYS file, but they forget to
  588. warn you that if you already have a file by that name, this command'll
  589. erase the old copy completely!
  590.  
  591. See the section on the RENAME command for some information about how
  592. the meaning of wildcards differs slightly between the source side and
  593. the target side of a command, when you're copying files to different
  594. names than what they had before.
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.                               The |TFOR|T Command
  602.  
  603. This is mainly a batch file command, but it is also very useful at the
  604. DOS prompt.  It works sort of like replaceable parameters.  Example:
  605.           |nFOR|n %%a IN (*.BAT) DO |nTYPE|n %%a
  606. What that command will do, is to expand the wildcard specification *.BAT
  607. into all the filenames that fit it, and then type each one to the screen.
  608. This is useful because the TYPE command does not work on wildcards.
  609.  
  610. How about the DEL command?  It doesn't work on more than one filename at
  611. a time unless the filenames can be named by a wildcard specification.  So
  612. you could do this:
  613.           |nFOR|n %%a IN (FILE1.TXT TEXT2.FIL LETTER3.DOC) DO |nDEL|n %%a
  614. This command will replace the %%a in the |nDEL|n command, with each filename
  615. listed in parentheses, in turn, and delete each one.
  616.  
  617. You can also use the %%a variable to fill in for the commands to be exec-
  618. uted, instead of for the |nparameters|n to the command.  Like this:
  619.           |nFOR|n %%a IN (|nTYPE|n |nPAUSE|n |nDEL|n) DO %%a FILE1.TXT
  620.                            <page down> for more
  621.                                FOR continued
  622. This command will type the FILE1.TXT file to the screen, then pause for
  623. a keystroke, and then delete the file.  If, by seeing the file on the
  624. screen, you realize that you didn't really want to delete it, you could
  625. hit <Ctrl-C> instead of any other keystroke, when PAUSE is waiting for
  626. input, to BREAK out of the batch file without deleting FILE1.TXT.  If
  627. you hit anything else besides <Ctrl-C> or <Ctrl-Break>, then FILE1.TXT
  628. will be deleted.
  629.  
  630. Now what would make that particular command really useful, is if you used
  631. a replaceable parameter instead of a particular filename.  Like this:
  632.           |nFOR|n %%a IN (|nTYPE|n |nPAUSE|n |nDEL|n) DO %%a %1
  633. Now if that command were in a |nbatch file|n named D.BAT and you used it with
  634. a command line like D FILE1.TXT, then FILE1.TXT would be placed where the
  635. |nbatch file|n says %1, or if the next time you executed that |nbatch file|n, you
  636. said D LETTER.DOC, then that time LETTER.DOC would be the file that the
  637. TYPE, |nPAUSE|n, and DEL commands would act on.
  638.  
  639. You're probably wondering why it's not just as good to use a |nbatch file|n
  640.                            <page down> for more
  641.                                FOR continued
  642. like this instead of that one complicated command:
  643.           |nTYPE|n %1
  644.           |nPAUSE|n
  645.           |nDEL|n %1
  646. Well that batch file will do the exact same thing, just less efficiently.
  647. Remember that DOS executes batch files by reading the first line off the
  648. disk, then executing it, then reading the next line off the disk, then
  649. executing it, then reading the next line off the disk, etc.  In other
  650. words, it's slow.  If you put all three of those commands on one line by
  651. using the |nFOR|n command, then you have a more efficient |nbatch file|n.  I
  652. know, it's only a difference of a couple milliseconds if you're using a
  653. decent hard drive.  But what if you have a one-floppy-drive system?  And
  654. what if the |nbatch file|n is on one disk and the file you want to delete is
  655. on another?  Then you put the |nbatch file|n disk into the drive and execute
  656. it like D B:LETTER.DOC (remember that on one-floppy-systems, DOS acts
  657. like you have an A: drive and a B: drive, and asks you to switch disks
  658. when necessary) so the first line of the |nbatch file|n is read from the disk
  659. and then you are requested to put the drive B: disk into the drive, and
  660.                            <page down> for more
  661.                                FOR continued
  662. the file is typed to the screen.  Then DOS needs you to put the batch
  663. file disk back into the drive so it can read the second line of the batch
  664. file.  Then when the third line of the batch file comes, you have to
  665. change disks again so that DOS can delete the file.  Then you have to put
  666. the |nbatch file|n disk in one more time so that DOS can look to see if there
  667. were any more commands in the |nbatch file|n or not.  Well if the |nFOR|n command
  668. had been used instead, then DOS would only need the |nbatch file|n disk twice
  669. instead of three times.  (Yeah, I know, big deal, right?)
  670.  
  671. Another way to use replaceable parameters with the |nFOR|n command is to put
  672. them into the parentheses, like this:
  673.           |nFOR|n %%a IN (%1 %2 %3 %4 %5 %6 %7 %8 %9) DO |nTYPE|n %%a > |nPRN|n
  674. Now you can specify anywhere from one to nine filenames on the command
  675. line, and they will be typed to the printer, all with just one command.
  676.  
  677. Here's a strange one.  Suppose you need a way to make a |nbatch file|n pause
  678. for a couple moments, without requiring any keyboard input to make it
  679. start going again.  How about this:
  680.                            <page down> for more
  681.                                FOR continued
  682.           |nFOR|n %%a IN (1 2 3 4 5 6 7 8 9 0) DO |nCHKDSK|n
  683. Since there's no %%a in the ending part of that command, the numbers in-
  684. side the parentheses have no effect on the CHKDSK command, but they just
  685. cause the |nCHKDSK|n command to be performed ten times over.  This would put
  686. a decent-length pause into your batch file.  It's not a real good idea to
  687. do it though, because that's a good bit of wear-n-tear on your hard drive
  688. for no good reason.  But it was just an example of how you can use |nFOR|n to
  689. execute the same command some specified number of times.
  690.  
  691. Personally, I find the most use for the |nFOR|n command at the DOS prompt
  692. rather than inside batch files, even though all the books usually say
  693. that |nFOR|n is just a |nbatch file|n command.  How about if you want to copy
  694. eight files that can't be covered in one wildcard specification, from
  695. one disk to another?  Without the |nFOR|n command you have to give the first
  696. COPY command, wait for that to finish, give another |nCOPY|n command, wait
  697. for that one, give another command, wait, etc.  Using |nFOR|n instead:
  698.           |nFOR|n %a IN (FILE1.TXT TEXT2.FIL LETTER3.DOC ABCDE.DOC FOOBAR.DOC
  699.                            TEXT6.DOC LETTER7.FIL FILE8.TXT) DO |nCOPY|n %a B:
  700.                            <page down> for more
  701.                                FOR continued
  702. Now as long as that all fits on a 127-character command line, all the
  703. copying will be done while you sit back and watch.
  704.  
  705. Notice that time I said %a instead of %%a.  At the DOS prompt you only
  706. want one percent sign (%), while inside a batch file, you need two.
  707.  
  708. You don't have to use %%a or %a.  You could use %B or %q or %Z or what-
  709. ever you want.  Any letter, |nupper|n or lowercase will do, as long as it's
  710. a letter, and it's the same at the beginning and the end of the same com-
  711. mand.  For example, |nFOR|n %%a IN (*.*) DO |nDEL|n %%A won't work because DOS
  712. will be looking for some %%A file to delete, when all it has is some %%a
  713. files.  DOS does not think of |nupper|n and lowercase letters as the same.
  714.  
  715. That was a good command, though, if it had the same variable at the be-
  716. ginning and the end.  |nFOR|n %%a IN (*.*) DO |nDEL|n %%a will do the same thing
  717. as |nDEL|n |n*.*|n but it won't ask you "Are you sure? (y/n)" because as far as
  718. the DEL command knows, you're only deleting one file at a time instead of
  719. a whole directory.
  720.                            <page down> for more
  721.                                FOR continued
  722. In many ways, the |nFOR|n command acts like a miniature batch file, even when
  723. you're using it from the DOS prompt.  For example, if you want to use the
  724. |nFOR|n command to execute a |nbatch file|n, you have to use the CALL or COMMAN|1D
  725. command, even if you're working at the command line instead of within an-
  726. other |nbatch file|n.  Without |nCALL|n or COMMAND, the |nbatch file|n will be exec-
  727. uted with the first parameter in the set in parentheses, and then you'll
  728. get your DOS |nprompt|n back.  DOS will think it's done with what you told it
  729. to do because the |nbatch file|n it was working on has finished.  The |nCALL|n or
  730. COMMAND /C command will cause the |nbatch file|n, when it's done, to return
  731. control to the |nFOR|n command instead of to the DOS |nprompt|n.  Here's an exam-
  732. ple, supposing you have a |nbatch file|n named BATCH.BAT:
  733.           |nFOR|n %a IN (*.*) DO |nCALL|n BATCH %a
  734. And of course BATCH.BAT must have a %1 replaceable parameter inside it,
  735. or else there's no point in trying to feed it a %a parameter.  So, the
  736. |nCALL|n command is not completely useless at the DOS |nprompt|n after all, the
  737. way most people think it is!
  738.  
  739.  
  740.  
  741.                                  The |tPATH|t
  742.  
  743. A |npath|n in DOS is just the road that DOS would have to follow through the
  744. directories, in order to find a file that you want it to find.  For a
  745. file named FOO.BAR in the subdirectory called ABC which is a subdirec-
  746. tory of the subdirectory called DEF which is a directory on the D: drive,
  747. (got that?) the full filespec for that file would be D:\DEF\ABC\FOO.BAR,
  748. and the \DEF\ABC\ part is the |npath|n for that file.
  749.  
  750. When you type in a command at the DOS prompt, if you have not specified
  751. the |npath|n to the command file on the command line, and if the command is
  752. not an internal part of COMMAND.COM, then DOS will search the current
  753. |ndirectory|n for the file, and if it's not there, DOS will search each dir-
  754. ectory listed on the |nPATH|n variable in the environment.  When you first
  755. boot up your computer, the |nPATH|n variable looks like this:
  756.           |nPATH|n=
  757. It's not set equal to anything!  (You can use the |nSET|n command to view the
  758. strings that are in the |nenvironment|n.)  Therefore, any external command
  759. that's not in the |ncurrent|n |ndirectory|n (unless you've specified the correct
  760.                            <page down> for more
  761.                               PATH continued
  762. |npath|n on the command line), will not be found, and you will receive the
  763. famous "|tBad command or filename|t" message.  What you need to do is put a
  764. |nPATH|n statement into your AUTOEXEC.BAT, which lists all the directories
  765. where your most common commands reside.  That way, DOS will know where
  766. to look to find these command files in order to execute them, even if
  767. you are not |scurrent|sly in the directory where they reside.
  768.  
  769. All of your DOS commands that came with your computer should be in a dir-
  770. ectory called DOS.  This should be one of the first directories listed on
  771. your |nPATH|n.  DOS searches the directories in the order in which they are
  772. listed on the |nPATH|n statement.  So you don't want the |ndirectory|n which con-
  773. tains your most commonly used commands at the end of the |nPATH|n statement,
  774. because this will increase the time it takes for DOS to find the command
  775. file.
  776.  
  777. Why don't you just put all of your directories on the |nPATH|n?  Three rea-
  778. sons:  First, the entire |nPATH|n statement, including |nPATH|n=, can only be 127
  779. characters long!  Second, most programs don't know how to find their com-
  780.                            <page down> for more
  781.                               PATH continued
  782. panion files using the |nPATH|n statement, and those programs that don't know
  783. how to use an environment variable either, to find their companion files,
  784. won't be able to find their companion files unless the files are in the
  785. current directory.  Therefore, there would be no purpose in having this
  786. |ndirectory|n on the |nPATH|n, since if you start the program from another direc-
  787. tory, the program won't be able to run anyway.  For this type of program,
  788. you have to change to the program's |ndirectory|n before you run it, and that
  789. is all there is to it!  Third, the longer the |nPATH|n statement, the longer
  790. it will take DOS to search all the directories on it, in order to find a
  791. command file that you've asked it to execute!  A batch file is a very
  792. simple and effective way to avoid having a long |nPATH|n variable.
  793.  
  794. Here's an example of a |nPATH|n statement:
  795.           |nPATH|n C:\DOS;C:\UTIL;C:\DOS\BIN
  796. Notice that each |ndirectory|n specified is separated from the others with a
  797. semicolon (;).  And always include the full |ndirectory|n specification for
  798. each |ndirectory|n, including the drive letter, as above, instead of some-
  799. thing like |nPATH|n \DOS;\UTIL;\DOS\BIN, because if the drive letter is not
  800.                            <page down> for more
  801.                               PATH continued
  802. included, then when you have A: as your current drive, your |nPATH|n won't
  803. work at all, because DOS will be searching on A: for the \DOS, \UTIL, and
  804. \DOS\BIN directories, which don't exist on drive A:.  They're on C:.
  805.  
  806. Notice that in most cases, you need to use the SET command to set an
  807. environment variable, but for |nPATH|n and PROMPT, the set command is not
  808. required.  Also, on some systems, an equals (=) sign is required between
  809. |nPATH|n and the rest of the statement.  So if something like |nPATH|n C:\DOS;
  810. C:\ABC won't work on your system, use |nPATH|n=C:\DOS;C:\ABC instead.  There
  811. must never be any spaces in the |nPATH|n statement, except between |nPATH|n and
  812. the rest of it, and there should not be a semicolon (;) after the last
  813. directory name!
  814.  
  815. Remember, though, that a |nPATH|n statement is never a requirement.  It is
  816. only a time-saver for you.  DOS could just as easily find any command
  817. file if you were to include the full file specification for the command,
  818. on the command line.  For example, if you have a file named EXPLOSIV.COM
  819. in the \UTIL |ndirectory|n of the C: drive, and C:\UTIL is not on your |nPATH|n,
  820. you can enter the command as C:\UTIL\EXPLOSIV rather than just EXPLOSIV.
  821.                              The |TSHIFT|T Command
  822.  
  823. This is a batch file command which has no use whatsoever at the DOS
  824. prompt.  Its only purpose is in conjunction with replaceable parameters.
  825. All it does is shift everything over to the left.  Huh?
  826.  
  827. Well, suppose you are using a whole bunch of |nreplaceable|n |nparameters|n in a
  828. |nbatch file|n.  All that's strictly allowed is %0 to represent the name of
  829. the |nbatch file|n, and then %1 through %9 for whatever you want to use them
  830. for.  What if you need more than nine?  That's what |nSHIFT|n is for.  Here's
  831. the command line we'll use for an example:
  832.           D 1.TXT 2.TXT 3.TXT 4.TXT 5.TXT 6.TXT 7.TXT 8.TXT 9.TXT 0.TXT
  833. Well, the name of the |nbatch file|n, D, is %0.  The first parameter, 1.TXT,
  834. is %1, the second one, 2.TXT, is %2, etc., up until the tenth one, 0.TXT,
  835. which doesn't have any %# because there's no such thing as %10.  So, how
  836. are we going to use it?  Well, as soon as we are done, in the |nbatch file|n,
  837. with whatever we needed to do to %1 through %9, we could use the |nSHIFT|n
  838. command which will move everything over one space to the left.  The name
  839. of the |nbatch file|n will no longer have any %#, 1.TXT will become %0, and
  840.                            <page down> for more
  841.                               SHIFT continued
  842. 2.TXT is now %1, etc., up until 0.TXT becomes %9.  Now 0.TXT can have a
  843. %# even though it's the eleventh word on the command line.  If there were
  844. another file, say 11.TXT, on the command line, then another |nSHIFT|n command
  845. would make 1.TXT not have any %#, and 2.TXT would be %0, 3.TXT gets %1,
  846. etc., until 0.TXT is %8 and 11.TXT is %9.  So it is conceivable to have
  847. an unlimited number of parameters on the command line (as long as the to-
  848. tal length of the command line is 127 characters or less).  You just need
  849. to have as many |nSHIFT|n commands in the batch file as there are |nparameters|n
  850. past the ninth one.
  851.  
  852. The |nSHIFT|n command also comes in handy when you want to do the exact same
  853. thing to a whole bunch of |nparameters|n, and you could be using a different
  854. number of |nparameters|n each time.  Let's use that same sample command line
  855. above, and say that D.BAT looks like this:
  856.           :START
  857.           |nDEL|n %1
  858.           |nSHIFT|n
  859.           IF !%1==! |nGOTO|n END
  860.                            <page down> for more
  861.                               SHIFT continued
  862.           |nGOTO|n START
  863.           :END
  864. Well, the first line is just a label for the GOTO command.  Since it
  865. starts with a colon (:), it will be completely ignored until such time as
  866. DOS sees the |nGOTO|n command, so having it as the first line is not a prob-
  867. lem.  The next line just deletes the file that currently has the value of
  868. %1.  Right now, since there has not been any |nSHIFT|n command yet, it is the
  869. first word after the name of the batch file on the command line.  The
  870. next line shifts everything on the command line, one space to the left,
  871. so that now what was %1 is now %0, what was %2 is now %1, etc.  The next
  872. line checks to see if we're done yet.  If, after the shift, there is no-
  873. thing left to put into %1, then DOS will expand this line to say IF !==!
  874. |nGOTO|n END (because %1 is now "nothing") and since ! does equal !, the
  875. |nbatch file|n will |nGOTO|n END.  But if there is still something left on the
  876. command line after the shift, so that %1 does not equal nothing, then the
  877. line will be |nexpanded|n to say, for example, IF !2.TXT==! |nGOTO|n END, and
  878. since !2.TXT does not equal !, the |nGOTO|n END command will be ignored, and
  879. the |nGOTO|n START command will be executed instead.  This just keeps on go-
  880.                            <page down> for more
  881.                               SHIFT continued
  882. ing until however many files were included on the command line, have
  883. been deleted, at which time %1 will be equal to nothing, and the batch
  884. file will end.  So you see, you can use this |nbatch file|n to delete one
  885. file, three files, or twenty files (if you can fit all their names on
  886. a 127-character command line), with just one command.
  887.  
  888.  
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.  
  901.                             Code Page Switching
  902.  
  903. |TCHCP|T, |TCOUNTRY|T, |TGRAFTABL|T, |TKEYB|T, KEYB??, |TNLSFUNC|T, DISPLAY.SYS, PRINTER.SYS,
  904. and SELECT are all commands and |sdevice driver|ss that have no use other
  905. than to enable code page switching.  Ignore them.  The files in your DOS
  906. directory which have the extension .CPI are the tables that these com-
  907. mands use.  Ignore them too.  The MODE command is also used for code page
  908. switching, but at least it has useful functions as well.
  909.  
  910. Oh, ok, I'll at least tell you what code page switching actually is.  IBM
  911. could have picked a much simpler name for this stuff.  All it means is,
  912. setting DOS up to be able to use characters like Ä and ö for foreign lan-
  913. guage alphabets, instead of the alphabet that we use here in the good old
  914. U. S. of A.  The code page used for plain old English is the default, so
  915. you don't have to set up anything special to use it.  But if you want to
  916. type in a different language, then you need to set up its code page, so
  917. you can use those foreign-language characters.  So that's what code page
  918. switching is all about.
  919.  
  920.  
  921.                            Reserved DOS |tDevice|1s|t
  922.  
  923. A device driver is a piece of software that tells DOS how to deal with
  924. some external peripheral device that connects to the computer.  Well DOS
  925. already knows how to deal with a few peripheral devices, because it has
  926. some built-in device drivers for those devices.
  927.  
  928. These devices that DOS automatically knows how to work with have their
  929. very own special names, and you mustn't try to use those names for any-
  930. thing else, such as filenames or anything.  For example, if you tried to
  931. use the command |nCOPY|n FILE.TXT |nNUL|n.TXT to make a copy of FILE.TXT and call
  932. it |nNUL|n.TXT, DOS would completely ignore the .TXT extension and use the
  933. device |nNUL|n instead of the filename you thought you were using.  DOS would
  934. copy the FILE.TXT file to the |nNUL|n device, which means "nowhere" and you
  935. would not end up having the intended copy of that file at all.
  936.  
  937. Why does the |TNUL|T device mean "nowhere"?  Well, it just does.  It is a
  938. name for a device that doesn't really exist.  What good is it?  Plenty.
  939. For one thing, if you want to check the integrity of a file that's sit-
  940.                            <page down> for more
  941.                              Device|1s continued
  942. ting on a disk that you think you might have damaged, you can copy the
  943. file to the NUL device and if DOS gives an error message, then you know
  944. the file has been damaged.  If there's no error message then the copy was
  945. successful, which means the file was readable.  Of course you could al-
  946. ways just copy the file to another disk or directory, but unless you wan-
  947. ted an extra copy of it anyway, then you'll just have to delete the file
  948. after the test.  Using |nNUL|n as the COPY command's destination saves that
  949. step.
  950.  
  951. The most common use for the |nNUL|n device is to make the execution of a
  952. batch file cleaner.  Suppose you have |nCOPY|n commands in your AUTOEXEC.BAT
  953. file that copy files to your RAMdisk.  Well after each of those files are
  954. copied, DOS shows the message "1 File(s) copied" on the screen.  You
  955. don't want to look at that every time you boot your computer, do you?
  956. Well you could put > |nNUL|n at the end of each |nCOPY|n command, and since the
  957. "1 File(s) copied" message is sent to STanDard OUTput, the > symbol will
  958. use redirection to send that message to the |nNUL|n device and you won't have
  959. to look at it on the screen anymore.
  960.                            <page down> for more
  961.                              Device|1s continued
  962. The |TPRN|T device is just another name for |nLPT1|n.
  963.  
  964. |TAUX|T is another name for |nCOM1|n.
  965.  
  966. |TLPT1|T is the first parallel port, or printer port.  If you have a printer
  967. hooked up to it, you can print out a file by typing |nCOPY|n FILE.EXT |nLPT1|n or
  968. |nCOPY|n FILE.EXT |nPRN|n.  If your printer is hooked up to a serial port in-
  969. stead, you can use the MODE command, as in |nMODE|n |nLPT1|n = |nCOM1|n to redirect
  970. everything that DOS sends to |nLPT1|n, to |nCOM1|n instead.  Then you'll be able
  971. to use the |nPRN|n device as if your printer was on |nLPT1|n.
  972.  
  973. |TCOM1|T is the first serial port, or communications port.  Modems, printers,
  974. and mice are three things that are very commonly connected to serial
  975. ports.  If your modem has gone offhook and you can't get it to hang up,
  976. you can use the command |nECHO|n ATH0 > |nCOM1|n if your modem is on |nCOM1|n, to
  977. make it hang up.  (If your modem is Hayes-compatible, that is.)
  978.  
  979. What's the difference between a parallel port and a serial port?  Oh, a
  980.                            <page down> for more
  981.                              Device|1s continued
  982. big difference!  A serial port sends bits (eighths of a byte) of data in
  983. a serial fashion, that is, one after another.  Just one bit at a time.  A
  984. parallel port sends data through eight parallel wires, so that eight bits
  985. (one byte) go through the port at a time.  So it's pretty safe to assume
  986. that a parallel port will send a certain amount of information eight
  987. times as fast as a serial port will.  But printers are just about the on-
  988. ly things that are very commonly hooked up to parallel ports.  Modems and
  989. mice just can't use parallel ports, even though it would be nice if they
  990. could because of the speed difference.
  991.  
  992. The |TCLOCK$|T device can't really be used for any purpose from the command
  993. line or anything.  It refers to the clock that DOS uses to keep track of
  994. elapsed time.  (This is not the same as any battery-backed clock you
  995. might have installed on your system.)  Whatever time this clock says is
  996. the time that will be listed in a file's directory entry every time you
  997. update it.  The only reason you need to know the name of this device is
  998. just so you never try to use that name for a filename, since it is a re-
  999. served DOS device name.
  1000.                            <page down> for more
  1001.                              Device|1s continued
  1002. Ok, I saved the best device for last.  |TCON|T is the device that DOS uses
  1003. for STanDard INput (STDIN), STanDard OUTput (STDOUT), and STanDard ERRor
  1004. (STDERR).  Unless there has been some redirection performed, then STDIN
  1005. is the keyboard and STDOUT is the monitor screen.  STDERR is always the
  1006. monitor.  There are a whole lot of things you can do with the |nCON|n device
  1007. name, such as |nCOPY|n |nCON|n |nPRN|n to make your printer act sort of like a type-
  1008. writer, or |nCOPY|n |nCON|n FILENAME to create an ASCII file without using a text
  1009. editor or anything.  See the section on the COPY command for details.
  1010.  
  1011. A lot of books show the device names as |nCON|n: or |nPRN|n: or |nLPT1|n:, with the
  1012. colons after them, but they work just fine with or without the colons.
  1013. I think the colons are mostly used just to differentiate between device
  1014. names and filenames, so that you don't think they're referring to some
  1015. filename when they say |nCON|n:.
  1016.  
  1017.  
  1018.  
  1019.  
  1020.  
  1021.                              The |TCTTY|T Command
  1022.  
  1023. I have no idea what that stands for, but I know what it does.  It trans-
  1024. fers control of your system to some other device.  Like if you have a
  1025. second monitor and keyboard connected to your COM1 port (also known as
  1026. |sAUX|s), then you could give the command |nCTTY|n |nAUX|n and output would go to the
  1027. second monitor, and input would be accepted from the second |nkeyboard|n.
  1028. Then when you're ready to go back to the main monitor and |nkeyboard|n, then
  1029. on the second |nkeyboard|n you type |nCTTY|n |nCON|n and that puts things back to
  1030. normal.
  1031.  
  1032. Well the only use I've ever found for |nCTTY|n, since I don't have any other
  1033. monitors or keyboards hooked up, is for cleaning up the screen display
  1034. during execution of a batch file.  If you have a whole bunch of COPY
  1035. commands in a row in a |nbatch file|n, you get a screen that looks like this
  1036. when you execute that |nbatch file|n:
  1037.           1 File(s) copied
  1038.           1 File(s) copied
  1039.           1 File(s) copied
  1040.                            <page down> for more
  1041.                               CTTY continued
  1042. Now who wants to look at a screen like that?  Not I.  If you're very
  1043. careful and make sure you don't forget the |nCTTY|n |nCON|n command at the end,
  1044. you can put |nCTTY|n |nNUL|n at the beginning of the list of COPY commands in the
  1045. batch file, like this:
  1046.           |nCTTY|n |nNUL|n
  1047.           |nCOPY|n FILE1.TXT D:
  1048.           |nCOPY|n FILE2.TXT D:
  1049.           (Etc.)
  1050.           |nCTTY|n |nCON|n
  1051. If you forget the |nCTTY|n |nCON|n at the end there, you'll be in big trouble.
  1052. Because your computer is no longer accepting any input from the keyboard.
  1053. You can't enter the |nCTTY|n |nCON|n command from the |nkeyboard|n, because DOS is
  1054. only accepting input from the NUL device, which doesn't even exist.  So
  1055. don't forget the |nCTTY|n |nCON|n command.
  1056.  
  1057. Another possible problem with |nCTTY|n |nNUL|n, is that it redirects not only
  1058. STanDard INput and STanDard OUTput, but also STanDard ERRor.  So even the
  1059. error messages that would normally show on screen will go to the |nNUL|n de-
  1060.                            <page down> for more
  1061.                               CTTY continued
  1062. vice instead.  You won't know if there have been any errors.  So don't
  1063. use |nCTTY|n |nNUL|n unless you're sure that the procedure that comes after that
  1064. command will never cause any errors.  For example if you're copying files
  1065. to a RAMdisk whose letter is D:, you could use a command like IF NOT EX-
  1066. IST D:\NUL |nGOTO|n END to make sure that the |nRAMdisk|n was properly created,
  1067. before you use |nCTTY|n |nNUL|n and start copying.  (See the section on EXIST for
  1068. details on that command.)  And make sure that there's no possible way
  1069. that the batch file can possibly skip the |nCTTY|n |nCON|n command, such as be-
  1070. cause of a GOTO command or a syntax error.
  1071.  
  1072. Now if you ever need to use CON while you're in the middle of a |nCTTY|n |nNUL|n
  1073. section of a |nbatch file|n, you don't have to do |nCTTY|n |nCON|n then do your stuff
  1074. then do |nCTTY|n |nNUL|n again.  For example, if you need to use a PAUSE command,
  1075. you can do it like this:
  1076.           |nECHO|n Don't even THINK about using Ctrl-C or Ctrl-Break > |nCON|n
  1077.           |nECHO|n Strike any key to continue. . . .  > |nCON|n
  1078.           |nPAUSE|n < |nCON|n
  1079. This method uses redirection to send a message to the screen even though
  1080.                            <page down> for more
  1081.                               CTTY continued
  1082. output has been redirected to NUL, and the third line will accept a key-
  1083. stroke from the keyboard even though input has been redirected to |nNUL|n.
  1084. Now if a body were to type the <Ctrl-C> or <Ctrl-Break> combination while
  1085. PAUSE is waiting for a keystroke, that would break out of the batch file
  1086. so that the |nCTTY|n |nCON|n command would not get executed.  There's not a thing
  1087. you can do when that happens except reboot.  Because the |nNUL|n device is
  1088. never going to send the command |nCTTY|n |nCON|n to DOS, and that's the only
  1089. place DOS is accepting input from while a |nCTTY|n |nNUL|n command is in effect.
  1090.  
  1091. One more problem with this command, is that it only works on STDIN, STD-
  1092. OUT, and STDERR.  That means STanDard INput, STanDard OUTput, and StanD-
  1093. ard ERRor.  Those are the normal methods that DOS uses to communicate
  1094. with the CON device|1s (monitor and keyboard).  Well there are many pro-
  1095. grams that read directly from the |nkeyboard|n and/or write directly to the
  1096. video memory, and those programs will continue to use your normal |nCON|n de-
  1097. vice rather than |nNUL|n or AUX or whatever you had redirected it to using
  1098. the |nCTTY|n command.  Because these programs are rude and bypass DOS to talk
  1099. directly to the |nkeyboard|n and video adapter.
  1100.  
  1101.                         The |TDATE|T and |TTIME|T Commands
  1102.  
  1103. These commands are pretty straightforward.  If you enter the |nDATE|n command
  1104. with no parameters, its output will look about like this:
  1105.           |nCurrent|n date is Wed 06-19-1991
  1106.           Enter new date (mm-dd-yy): _
  1107. And it sits there waiting for you to either tell it the correct date, or
  1108. hit the <Enter> key to accept the date that is already there.  You can
  1109. also enter the command with a date, as in |nDATE|n 06-19-91, and that will
  1110. just set the date and immediately give you a new prompt.
  1111.  
  1112. If you enter the |nTIME|n command with no |nparameters|n, here's the display:
  1113.           |nCurrent|n time is 5:32:34.54p
  1114.           Enter new time: _
  1115. You can also enter the new time right on the command line, as in |nTIME|n
  1116. 5:32p or |nTIME|n 17:32.  In most DOS versions, you can use a period instead
  1117. of a colon to divide hours from minutes.  That's easier than messing with
  1118. the <Shift> key to type a colon.  If you have DOS version 3.3 or earlier,
  1119. you're on a 24-hour clock like the military uses, instead of being able
  1120.                            <page down> for more
  1121.                           DATE and TIME continued
  1122. to use a or p for a.m. or p.m.  So if it is after noon, you add 12 hours
  1123. to the time.  For example, 6 p.m. is 18:00 on a 24-hour clock.
  1124.  
  1125. If your computer doesn't have an internal battery-backed clock, then you
  1126. need to have the |nDATE|n and |nTIME|n commands in your AUTOEXEC.BAT file so that
  1127. you'll have a chance to set the date and time in DOS's system clock each
  1128. time you reboot.  Otherwise your system clock will be reset to 01-01-80
  1129. and 12:00 or something like that.  Now whatever values are in DOS's sys-
  1130. tem clock (the name of which is |sCLOCK$|s) are the values that will be put
  1131. into the directory entries of every file that you update, and if the dir-
  1132. ectory entries get the wrong values, then an incremental backup will act
  1133. on the wrong files.  That's just one of the very important reasons for
  1134. keeping the right date and time in the system clock.  So without a bat-
  1135. tery-backed clock, regardless of what a pain in the neck it is, you real-
  1136. ly do need to have these two commands in your |nAUTOEXEC.BAT|n file.
  1137.  
  1138. If you boot from a disk that doesn't have an |nAUTOEXEC.BAT|n file on it, or
  1139. if that file is not in the root |ndirectory|n where DOS knows how to find it,
  1140.                            <page down> for more
  1141.                           DATE and TIME continued
  1142. then DOS will automatically execute the |nDATE|n and |nTIME|n commands when it's
  1143. done booting up.  If you do have an AUTOEXEC.BAT file, then DOS will only
  1144. execute these two commands if they are included in that file.
  1145.  
  1146. If you have DOS version 3.3 or later, and a hardware clock whose memory
  1147. address is the same as that used on true IBM brand computers, setting the
  1148. date or the time will automatically update the battery-backed hardware
  1149. clock so that the values will still be correct the next time you boot the
  1150. computer.  If you have an earlier DOS version, then you have a command
  1151. file somewhere, that came with your computer, that allows you to change
  1152. the date and time that's stored in the hardware clock, because DOS won't
  1153. do it for you.  Also it could be just a part of your CMOS setup, if you
  1154. don't have any command file for that purpose.  Of course, ignore this
  1155. paragraph if you don't have a hardware clock.
  1156.  
  1157. If you want to display the date or time without DOS stopping to wait for
  1158. you to press <Enter> or enter a new value, it can be done.
  1159.           |nECHO|n || |nMORE|n || |nDATE|n
  1160.                            <page down> for more
  1161.                           DATE and TIME continued
  1162. will usually do it.  That's because the ECHO command always sends a car-
  1163. riage return (the <Enter> key) along with whatever else it's sending.
  1164.  
  1165. Well in this case it sends the words "|nECHO|n is on" and a carriage return
  1166. to the MORE command, and the |nMORE|n command somehow strips out the words
  1167. "|nECHO|n is on" and just sends the carriage return along to the |nDATE|n com-
  1168. mand, which makes the |nDATE|n command act as if you had hit the <Enter> key
  1169. from the keyboard, after it had stopped and waited for your input.  (See
  1170. the redirection section for information on the || symbol.)
  1171.  
  1172. A similar method can be used to enter the |ncurrent|n date or time into an
  1173. environment variable for use in a batch file.  You'll need to write two
  1174. batch files to make this work.  You might call the first one TIMEVAR.BAT:
  1175.           |nECHO|n HELLO || |nMORE|n || |nTIME|n > HELLO.BAT
  1176.           HELLO
  1177. And the second |nbatch file|n has to be named |nCURRENT|n.BAT:
  1178.           |nSET|n |nTIME|n=%3
  1179. Now what happens is that the first command in TIMEVAR.BAT uses the same
  1180.                            <page down> for more
  1181.                           DATE and TIME continued
  1182. method as above to display the |ncurrent|n time on the screen without wait-
  1183. ing for any input.  Only this time, instead of the display going to the
  1184. screen, a file named HELLO.BAT is created which contains the output of
  1185. the |nTIME|n command.  The next line of TIMEVAR.BAT runs HELLO.BAT:
  1186.           |nCurrent|n time is 5:32:34:54p
  1187. Which runs |nCURRENT|n.BAT with "time" as %1 and "is" as %2 and "5:32:34.54p"
  1188. as %3.  So the command inside |nCURRENT|n.BAT sets an environment variable
  1189. named |nTIME|n, equal to the |ncurrent|n time at the time this series of batch
  1190. files was executed.  (See also redirection and replaceable parameters.)
  1191.  
  1192. If you want to have the |ncurrent|n time displayed as part of your prompt,
  1193. can use the $t |nprompt|n metacharacter to do that, but it will show you a
  1194. time like 17:15:43.72 and you don't want to see that, right?  But there
  1195. is also a $h metacharacter that is the <Backspace>.  So if you used the
  1196. command |nPROMPT|n $t$h$h$h$h$h$h$g, that would give you the time, and six
  1197. backspaces, and the > symbol, so it would look like 17:15> instead of
  1198. that ugly one that included the seconds and hundredths of seconds.  And
  1199. you can also use the $d |nprompt|n metacharacter, to give you the date.
  1200.  
  1201.                              The |TDEBUG|T Command
  1202.  
  1203. The only thing I really have to say to a beginner about this command, is
  1204. leave it alone.  If you don't know how to use it, then you don't know
  1205. enough about computers to have any business messing with it.  I don't
  1206. mean to sound harsh or anything but this is a highly powerful (meaning
  1207. dangerous, in the wrong hands) command.  One slip of a finger and you
  1208. could easily trash every speck of data on your entire hard disk.  You
  1209. can even damage the hardware itself with this command, believe it or
  1210. not!  Don't use it unless you know what you're doing!
  1211.  
  1212. That doesn't mean you should necessarily delete it from your hard disk,
  1213. however.  There are some things you can safely use it for.  PC Magazine
  1214. and several other computer-related magazines publish little scripts that
  1215. you can type in and then use |nDEBUG|n to assemble them into .COM files.
  1216. This gives you a way to get some little utilities such as CAPSLOCK.COM
  1217. without buying or downloading anything.  You can sit right in your living
  1218. room and create utilities that can perform all sorts of functions.  If it
  1219. weren't for |nDEBUG|n, you couldn't do that.  And it's really quite safe as
  1220.                            <page down> for more
  1221.                               DEBUG continued
  1222. long as you proofread each line you type in, before you hit the <Enter>
  1223. key, and just carefully follow the instructions in the magazine.
  1224.  
  1225. If you ever accidentally execute this command, you will get a prompt that
  1226. just looks like this:
  1227.           -
  1228. That's it.  That's the |nDEBUG|n |nprompt|n.  Just type a Q and hit the <Enter>
  1229. key, and you'll be right back in DOS.
  1230.  
  1231. Anyway, the main purpose of this command is to examine and modify data
  1232. either in memory, or on disk.  It's called |nDEBUG|n because its main purpose
  1233. is supposed to be for debugging programs that a programmer is in the pro-
  1234. cess of writing.  But hardly anybody ever uses it for that.  In fact,
  1235. hardly even any programmers use it for that.
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.                         The |TDEL|T and |TERASE|T Commands
  1242.  
  1243. These commands are interchangeable.  They are used to permanently remove
  1244. any file from any disk.  Ok, there are utilities such as PC Tools that
  1245. can undelete a file, and in DOS version 5.0 there is even an UNDELETE
  1246. command.  So deletion or erasure isn't always permanent.  If you realize
  1247. right away that you made a mistake, you can use one of those utilities,
  1248. or if you have DOS 5.0 you can use the |nUNDELETE|n command.  But if you do
  1249. not realize that you deleted the wrong file, until you or some program
  1250. has written some information to the disk, then maybe that information got
  1251. written right on top of where that deleted file was, and there's no way
  1252. to get that file back then!  So you should always act like |nDEL|n and |nERASE|n
  1253. are permanent even though that's not exactly true.
  1254.  
  1255. The syntax is really easy.  |nDEL|n FILENAME.EXT or |nERASE|n FILENAME.EXT is all
  1256. there is to it.  DOS version 4.0 or later adds a /P switch, which causes
  1257. DOS to stop and ask if you're sure.  This is useful when you're deleting
  1258. a group of files by using wildcards, because DOS will name each file that
  1259. it's about to delete, and if there was one that you didn't want to delete
  1260.                            <page down> for more
  1261.                           DEL and ERASE continued
  1262. you can say no.
  1263.  
  1264. If you have DOS version 4.0 or later you should always use the /P switch
  1265. if you're using wildcards.  For earlier versions, you should first use
  1266. the DIR command with the wildcard specification you're planning to use,
  1267. and it will show you the files that fit that wildcard spec.  If those are
  1268. indeed the files that you want to delete, then just type |nDEL|n and hit the
  1269. <F3> key which will copy the wildcard specification that you'd used from
  1270. the template (DOS's |nmemory|n of the last command you entered) onto the cur-
  1271. rent command line and you can execute the command without a chance of de-
  1272. leting the wrong files.  (See also editing keys.)
  1273.  
  1274. You can also use this command to delete all the files in a directory.
  1275. For recent versions of DOS, you just use the |ndirectory|n name in place of
  1276. the filename.  For earlier versions, you use the *.* wildcard specifica-
  1277. tion.  If your current |ndirectory|n is C:\ and you want to delete all the
  1278. files in C:\WP\LTRS you can just enter the command |nERASE|n WP\LTRS or |nERASE|n
  1279. WP\LTRS\*.* and DOS will say "Are you sure?" and you say "Y" and all
  1280.                            <page down> for more
  1281.                           DEL and ERASE continued
  1282. those files are gone.  DOS always asks if you're sure if you try to del-
  1283. ete a whole directory worth of files all at once.  If you want to remove
  1284. the |ndirectory|n after you have removed all the files from it, use the RMDIR
  1285. command.
  1286.  
  1287. There are a couple of ways to get around that question, though.  Don't
  1288. ever use this method without specifying the complete |spath|sname of the
  1289. files in question, because you might accidentally erase all the wrong
  1290. files, but here it is:
  1291.           |nECHO|n Y || |nDEL|n C:\WP\LTRS\*.*
  1292. The ECHO command sends the Y and a carriage return (the <Enter> key) to
  1293. the |nDEL|n command by means of redirection using the || symbol, so when DOS
  1294. asks you "Are you sure?" it finds that the "Y" is already waiting for it.
  1295.  
  1296. Another way is |nFOR|n %%a IN (C:\WP\LTRS\*.*) DO |nDEL|n %%a.  That method will
  1297. work without even asking the question, because DOS won't realize that
  1298. you've asked it to delete the whole |ndirectory|n at once.  It thinks it's
  1299. deleting one file at a time.  (See the section about the FOR command.)
  1300.                            <page down> for more
  1301.                           DEL and ERASE continued
  1302. Just don't ever forget that if DOS asks you "Are you sure?" after you en-
  1303. ter a |nDEL|n or |nERASE|n command, that it's trying to tell you that it's about
  1304. to delete every file from some directory or another.  If that's not what
  1305. you had in mind, then say no and take another look at the command you had
  1306. entered.
  1307.  
  1308. The |nDEL|n and |nERASE|n commands don't actually do a thing to the data in the
  1309. files that they delete.  All they do is to zero out the first bytes of
  1310. the |ndirectory|n and FAT entries for the files, so that DOS doesn't know
  1311. they're there anymore.  The files are still on the disk, it's just that
  1312. DOS can't find them.  That's why it is possible to UNDELETE them, until
  1313. such time as DOS uses that particular area of disk space to store some
  1314. other file, which overwrites the old deleted file and makes it totally
  1315. unrecoverable!
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.                           The |TDEVICEHIGH|T Command
  1322.  
  1323. This does exactly the same thing that the DEVIC|1E command does, only it
  1324. loads the specified device into the Upper Memory Blocks instead of into
  1325. conventional RAM.  In order for this to work, you have to have DOS ver-
  1326. sion 5.0, a 386 or later computer, some extended |nmemory|n, and the proper
  1327. statements in your CONFIG.SYS to prepare the UMB for use by DOS.  Here's
  1328. a basic |nCONFIG.SYS|n file that will work for this purpose:
  1329.           DEVICE=C:\DOS\HIMEM.SYS
  1330.           DEVICE=C:\DOS\EMM386.EXE NOEMS
  1331.           DOS=HIGH,UMB
  1332.           DEVICEHIGH=whatever
  1333. You can use the "RAM" parameter in place of the "NOEMS" parameter on the
  1334. EMM386 line, if you want to be able to use expanded (|sEMS|s) |nmemory|n.  But of
  1335. course it will eat up a bunch of your |nupper|n |nmemory|n, for the |nexpanded|n mem-
  1336. ory's page frame.
  1337.  
  1338. If you run out of |nupper|n |nmemory|n so that DOS can't load the specified de-
  1339. vice there, it will still load the device, but into |nconventional|n |nmemory|n,
  1340.                            <page down> for more
  1341.                            DEVICEHIGH continued
  1342. just as if you had used the DEVIC|1E command instead.
  1343.  
  1344. Now there are |sTSR|ss and |sdevice driver|ss that just won't run from Upper Mem-
  1345. ory at all.  No matter what.  And there are others that would run there
  1346. if only you could get them up there.  Some of them give a MEM command
  1347. reading like as if they were small enough to fit into a free UMB, and yet
  1348. they will load into conventional RAM instead of loading |nhigh|n, as if there
  1349. was not enough memory free in the UMB.  A lot of times, all this means is
  1350. that there's not enough |nmemory|n up there for it to load, not that there's
  1351. not enough for it to run.  What?  Well you see, many drivers and TSRs re-
  1352. quire a whole bunch of |nmemory|n while they're loading, but then as soon as
  1353. they're loaded, they settle down and only take up their normal amount of
  1354. |nmemory|n.  If you've got one of these, all you have to do is put its com-
  1355. mand earlier in the CONFIG.SYS or AUTOEXEC.BAT file, so that it loads be-
  1356. fore something else, so that at that time, there is a larger UMB open.
  1357. Then it can load, and it will settle down to its normal small size, so
  1358. that there will still be room for the one that you put the misbehaving
  1359. one in front of.  So with |nDEVICEHIGH|n and LOADHIGH, loading order of TSRs
  1360. and device drivers matters even more than it used to before DOS 5.0.
  1361.                             The |TDEVIC|1E|T Command
  1362.  
  1363. This is a command that only works in your CONFIG.SYS file, and what it
  1364. does is load a device driver into memory.  You have to watch what order
  1365. you put the DEVICE lines into your |nCONFIG.SYS|n file though.  For example,
  1366. any device that wants to use expanded |nmemory|n has to come after the line
  1367. that loads your |nexpanded|n |nmemory|n manager.  Any device that is going to use
  1368. the mouse has to be loaded into |nmemory|n after the mouse driver loads.
  1369.  
  1370. The syntax is quite simple.  Just remember that you have to include the
  1371. full file specification, including the path and the filename's extension,
  1372. for the |ndevice driver|n you're trying to load.  Since the |nCONFIG.SYS|n file
  1373. is read during |sboot|sup before COMMAND.COM loads and AUTOEXEC.BAT gets ex-
  1374. ecuted, there is no |nPATH|n variable in the environment yet so DOS can't
  1375. find any file that's not in the root directory of the boo|1t disk.  But you
  1376. shouldn't keep any device drivers in the |nroot|n |ndirectory|n of a hard disk.
  1377. Put them into a subdirectory to keep your |nroot|n |ndirectory|n clean.  A DEVICE
  1378. command should look similar to this:
  1379.           DEVICE=C:\DOS\ANSI.SYS
  1380.  
  1381.                            The |TDISKCOMP|T Command
  1382.  
  1383. This command is used to compare the data on one disk to the data on an-
  1384. other.  About the only use for it is right after you use the DISKCOPY
  1385. command, to make sure that command was completely successful.  Read the
  1386. section about the |nDISKCOPY|n command for more information, because the two
  1387. commands are quite similar in the way they operate.
  1388.  
  1389. Notice that |nDISKCOMP|n will say that two disks are totally different if the
  1390. one is not a |nDISKCOPY|n of the other.  Even if they have the exact same
  1391. files on them.  Because for example, if the files on the source disk were
  1392. fragmented, and the COPY or XCOPY command was used to copy all the files
  1393. to another disk, the target disk will be totally unfragmented.  And DISK-
  1394. |nCOMP|n compares sector-by-sector, not file-by-file.  So the two |ndisks|n won't
  1395. compare at all, even though each file on the target disk might be an ex-
  1396. act duplicate of its twin on the source disk.
  1397.  
  1398.  
  1399.  
  1400.  
  1401.                               The |TDO|1S|T Command
  1402.  
  1403. If you have DOS version 5.0, a 286 or later computer, and some extended
  1404. memory, you can put the DOS kernel into the High |nMemory|n Area to free up
  1405. about 45K of conventional |nmemory|n.  The command DOS=HIGH, if it is placed
  1406. into your CONFIG.SYS file after the HIMEM.SYS device driver is loaded,
  1407. will cause that to happen.  This will cause your BUFFERS to be loaded in-
  1408. to the HMA as well.
  1409.  
  1410. If you have a 386 or higher computer you can use the DOS=HIGH,UMB command
  1411. instead of plain old DOS=HIGH, after an expanded |nmemory|n manager such as
  1412. |nEMM386|n.EXE is loaded, to enable Upper |nMemory|n Block support so that you
  1413. can use the DEVICEHIGH and LOADHIGH commands to place your device drivers
  1414. and |sTSR|ss into the UMB area to free up a whole lot more |nconventional|n RAM.
  1415.  
  1416. If for some reason you want to have access to the UMB without having the
  1417. DOS kernel loaded |nhigh|n, you can use the command DOS=UMB instead.
  1418.  
  1419.  
  1420.  
  1421.                               The |TDIR|T Command
  1422.  
  1423. This command is used to display a DIRectory listing on your monitor.  A
  1424. |ndirectory|n listing includes the name, extension, size, and date and time
  1425. of last modification, for each file listed.  It also tells the volume
  1426. label of the disk, the name of the |ndirectory|n being listed, the number of
  1427. files and subdirectories displayed, and the free space left on the disk.
  1428.  
  1429. The |nDIR|n listing does not include files which have their H or S attributes
  1430. set to on, but it does work on files with R and A |nattributes|n.
  1431.  
  1432. You can display the |ndirectory|n listing for all the files in the current
  1433. |ndirectory|n by giving the command |nDIR|n all by itself, with no parameters.
  1434. You can see the listing for all the files in some other |ndirectory|n by in-
  1435. cluding that |ndirectory|n's |spath|sname on the command line, as in |nDIR|n \DOS.
  1436. You can see the entries for the files on a different disk by including
  1437. that disk's drive letter as part of the command as in |nDIR|n A:.  You can
  1438. see the names of only the files that have a .COM extension, by typing |nDIR|n
  1439. .COM, or just the files that start with the letter S by using |nDIR|n S*, or
  1440.                            <page down> for more
  1441.                                DIR continued
  1442. just about anything you want to do by using the * and ? wildcards and/or
  1443. the name of the drive and/or directory whose listing you want to display.
  1444. (Notice those commas are punctuation in the sentence, not part of the
  1445. commands.)  With the |nDIR|n command, you don't have to always include both
  1446. the filename and the extension of a group of files.  I mean if you wanted
  1447. to do something like copy all the files that have a .COM extension, you
  1448. would have to say *.COM but if you just want a |ndirectory|n listing of those
  1449. files, .COM will work.  The same way with all the files that start with
  1450. S, to copy them you would have to say S*.* but to get a |ndirectory|n listing
  1451. of them, S* will work.
  1452.  
  1453. If you want to list the files that have no extension, |nDIR|n *. will do it.
  1454. If you just said |nDIR|n * then DOS would show you every file, in the speci-
  1455. fied |ndirectory|n, even those that have extensions.  But since *. includes a
  1456. period, which is what separates filenames from their extensions, and then
  1457. it doesn't have anything after the period, that tells |nDIR|n to only show
  1458. files that have blank extensions.
  1459.  
  1460.                            <page down> for more
  1461.                                DIR continued
  1462. If you see a line that says <DIR> on it, in a directory listing, that is
  1463. a subdirectory entry.  You can see what files are in that subdirectory by
  1464. issuing the command |nDIR|n NAME where NAME is the name of that subdirectory.
  1465.  
  1466. If you are displaying the listing for any |ndirectory|n other than the root
  1467. |ndirectory|n, the first two entries will be . <DIR> and .. <DIR>.  See the
  1468. section on ". and .." for an explanation of those lines.
  1469.  
  1470. Remember that if you're looking for a particular file, it's a lot easier
  1471. to issue the command |nDIR|n FILENAME.EXT or |nDIR|n FILE*.* than it is to just
  1472. use the command |nDIR|n and scan all the filenames yourself looking for that
  1473. one file.  Let DOS do the work for you.
  1474.  
  1475. Although DOS displays the filename, and then one or more blank spaces,
  1476. and then the extension, that's not the format you want to use when you're
  1477. trying to do something with a file.  When you use a filename in a com-
  1478. mand, you type the filename, then no spaces, then the period, then the
  1479. extension.  That's the only way you'll get anything done in DOS, even if
  1480.                            <page down> for more
  1481.                                DIR continued
  1482. that's not the way DOS displays the directory listing.  Really, though,
  1483. it is more convenient the way DOS displays it.  It's just a lot easier to
  1484. read a |ndirectory|n listing like that.  I've seen some file management util-
  1485. ities that display |ndirectory|n listings the way they have to be typed, and
  1486. they're really hard to read.  Here's the difference:
  1487.           How |nDIR|n Displays Them:               How You Have to Type Them:
  1488.           COMMAND  COM                         |nCOMMAND.COM|n
  1489.           AUTOEXEC BAT                         |nAUTOEXEC.BAT|n
  1490.           CONFIG   SYS                         |nCONFIG.SYS|n
  1491.           |nDISKCOPY|n COM                         |nDISKCOPY|n.COM
  1492.           FORMAT   COM                         FORMAT.COM
  1493.           ANSI     SYS                         |nANSI.SYS|n
  1494.           |nATTRIB|n   EXE                         |nATTRIB|n.EXE
  1495.           SMARTDRV SYS                         |nSMARTDRV.SYS|n
  1496.  
  1497. You can use redirection to send the output of the |nDIR|n command to the
  1498. printer, with |nDIR|n > |nPRN|n, or to a file, with |nDIR|n > FILE.EXT.  Of course be
  1499. aware that if the file already exists, that command will delete every-
  1500.                            <page down> for more
  1501.                                DIR continued
  1502. thing that's already in the file and put the directory listing in place
  1503. of it.  If you want to add the |ndirectory|n listing to the end of a file
  1504. that already exists, use two > symbols, as in |nDIR|n >> FILE.EXT.
  1505.  
  1506. There are also two switches you can use with the |nDIR|n command, to modify
  1507. the command's operation a bit.  The /P switch will cause the |nDIR|n command
  1508. to only show you one screenful of data and pause, and say "Press any key
  1509. to continue. . ." so that you can read what it says before it scrolls off
  1510. the screen.  Then when you "Press any key", the next screenful of info is
  1511. displayed, etc.
  1512.  
  1513. Then there is the /W switch, which will give you a wide display.  It will
  1514. not show you the size or date and time of the files, but will just dis-
  1515. play the filenames and extensions, in five columns so that if you have a
  1516. |ndirectory|n with a whole bunch of files in it, you might be able to see
  1517. them all on the screen at once.
  1518.  
  1519. If you have a |ndirectory|n that's got even more files than can be displayed
  1520.                            <page down> for more
  1521.                                DIR continued
  1522. on one screen with the /W switch, you can use the /P and /W switches to-
  1523. gether, but you should seriously consider dividing those files into two
  1524. or more subdirectories instead of leaving them all in one directory.
  1525.  
  1526. If you do not have DOS version 5.0, then skip the rest of this section
  1527. except just to see what you're missing.  One of the improvements in DOS
  1528. 5.0 is a whole lot of options for the |nDIR|n command.
  1529.  
  1530. First of all, as well as the number of files listed and the free space
  1531. remaining on the disk, at the end of the |ndirectory|n listing, the total
  1532. number of bytes in the listed files is displayed.
  1533.  
  1534. Now the /W switch causes the filenames to be displayed in the form you
  1535. have to type them in, such as "CONFIG.SYS" instead of "CONFIG   SYS" the
  1536. way it worked in earlier versions.
  1537.  
  1538. Let's have a chart of all the new DOS 5.0 |nDIR|n command switches now, be-
  1539. fore we get into serious explanations:
  1540.                            <page down> for more
  1541.                                DIR continued
  1542.  
  1543.           /A |nattributes|n                   /O order for sorting
  1544.              A archive                       D date and time
  1545.              D |ndirectory|n                     E extension
  1546.              H hidden                        G group directories together
  1547.              R read-only                     N name
  1548.              S system                        S size
  1549.  
  1550.              /B bare display--(dirname and) filename.ext only
  1551.  
  1552.              /L lowercase dirnames and filenames
  1553.  
  1554.              /P pause display on each page (all DOS versions)
  1555.  
  1556.              /S subdirectories included
  1557.  
  1558.              /W wide display--five columns (all DOS versions)
  1559.  
  1560.                            <page down> for more
  1561.                                DIR continued
  1562. The /A switch will cause all filenames to be displayed, even those with
  1563. Hidden and System attributes.  Or you could use /AH to display only the
  1564. files that have the Hidden attribute set to on.  Or /A-A to show only the
  1565. filenames that do not have the A attribute.  Or /AHR to show only the
  1566. files that have both the H and the R |nattributes|n.  Or /A-S-D to show only
  1567. the files that have neither the S attribute nor the D (|sDirectory|s) attri-
  1568. bute.  (That's right, along with the A, H, R, and S |nattributes|n, there is
  1569. also the D one, by which DOS tells files and directories apart, and this
  1570. can be accessed by DOS 5.0's new |nDIR|n command although the ATTRIB command
  1571. still doesn't work with it.)  Or /AH-S to show only the files that have
  1572. the H attribute but not the S attribute.
  1573.  
  1574. The /O switch tells DOS what order you want the filenames sorted into
  1575. each time you see the |ndirectory|n listing.  The sorting doesn't seem to
  1576. slow DOS down, so don't be shy about using this switch.  Without this
  1577. switch, DOS displays the filenames in the order that their entries happen
  1578. to reside in the |ndirectory|n.  With this switch you can display the direc-
  1579. tories in alphabetical order followed by the filenames in alpha order
  1580.                            <page down> for more
  1581.                                DIR continued
  1582. (/O), or all the filenames and directory names mixed together in alpha
  1583. order (/ON), or reverse alpha order (/O-N), or all the files with no ex-
  1584. tensions followed by the |ndirectory|n names followed by the files that have
  1585. extensions sorted by extension (/OE), or the /OE display in reverse order
  1586. (/O-E), or all the files and directories mixed together and sorted by
  1587. date and time, from earlier to later (/OD), or from later to earlier
  1588. (/O-D), or all the directories in the order that they exist in the dir-
  1589. ectory followed by the filenames sorted by size starting with the small-
  1590. est ones (/OS), or the opposite of /OS--files sorted from largest to
  1591. smallest followed by the directories in |ndirectory|n order (/O-S), or final-
  1592. ly with the directories first in |ndirectory|n order followed by the files in
  1593. |ndirectory|n order (/OG), or files first followed by directories, all in
  1594. |ndirectory|n order (/O-G).
  1595.  
  1596. And of course you can use any combination of those /O switches.  For ex-
  1597. ample, my favorite is /OGEN which means display the directories first,
  1598. followed by the filenames, and sort the file extensions in alpha order,
  1599. and within groups that have the same extension, sort those files by name.
  1600.                            <page down> for more
  1601.                                DIR continued
  1602. (Having the same extension also means all the files that have no exten-
  1603. sion, and that includes directory names, so the |ndirectory|n names do also
  1604. get sorted in alpha order with that switch.)  The switch combination
  1605. /OD-S would mean to sort the files by date and time, but within groups
  1606. that have the same date and time, sort those files by size, in reverse
  1607. order meaning from largest to smallest.  (If you created all your direc-
  1608. tories at the same time, then they will appear together in a group in
  1609. this listing, but they won't be sorted in any particular order because
  1610. they all have a size of zero.  But if you add an N to that switch com-
  1611. bination, making it /OD-SN, then the |ndirectory|n names, or any other group
  1612. of files that have matching dates, times, and sizes, will be sorted in
  1613. alpha order by name.)
  1614.  
  1615. The /S switch tells DOS to show you a |ndirectory|n listing for the specified
  1616. |ndirectory|n, followed by the listings for each and every sub|ndirectory|n of
  1617. the specified |ndirectory|n, and every subdirectory of those subdirectories,
  1618. etc.  If the specified |ndirectory|n is the root, then this will give you
  1619. every filename on the entire disk.  If you combine this switch with a
  1620.                            <page down> for more
  1621.                                DIR continued
  1622. filename or a wildcard specification, such as |nDIR|n *.BAT /S, you would
  1623. find every file on the disk that has the specified filename.  Or if you
  1624. combine the /S with the /A, as in |nDIR|n /AH /S, that will show you every
  1625. file on the disk that has its Hidden attribute set to on.
  1626.  
  1627. The /B switch just gives you the filename-period-extension, with no vol-
  1628. ume label, no total number of bytes, no file sizes or dates, nothing ex-
  1629. cept the name, for all the files.  If you combine it with the /A-D switch
  1630. to exclude the directory names, this is really useful for creating a
  1631. batch file or text file of all the files in a |ndirectory|n.  |nDIR|n /B /A-D >
  1632. FILE.BAT will do it automatically.  And if you add the /S switch, you'll
  1633. get all the specified files in the specified |ndirectory|n and all of its
  1634. subdirectories, and in that case the display will include the full |spath|s-
  1635. name for each file listed, so that you will know which file came from
  1636. what |ndirectory|n.
  1637.  
  1638. The /L switch will convert all the letters in the |ndirectory|n names and
  1639. filenames to lowercase.
  1640.                            <page down> for more
  1641.                                DIR continued
  1642. Now another great feature of the DOS 5.0 |nDIR|n command, is that you can set
  1643. an environment variable called DIRCMD to tell DOS what switches you want
  1644. to use as the default.  Normally the |ndefault|n is no switches, so if you
  1645. type |nDIR|n by itself, you get the display that you would get if you hadn't
  1646. entered any switches on the command line, right?  Not anymore.  If you
  1647. put the line |nSET|n DIRCMD=/OGEN /P into your AUTOEXEC.BAT file, then every
  1648. time you issue the |nDIR|n command, DOS will see in the |nenvironment|n that you
  1649. want to use the /OGEN and /P switches as the |ndefault|n, and you will get
  1650. that display every time.  Now if you want to see, just this once, a dir-
  1651. ectory listing that is not sorted in any way, you can enter |nDIR|n /-O to
  1652. tell DOS that you want to temporarily ignore the /OGEN switch that you
  1653. have as your |ndefault|n in the DIRCMD |nenvironment|n variable.  Of course like
  1654. any other |nenvironment|n variable, you can change it at any time by using
  1655. the SET command, or by editing the |nSET|n DIRCMD line in your |nAUTOEXEC.BAT|n
  1656. file and |sreboot|sing.
  1657.  
  1658. Now remember, when DOS 5.0's |nDIR|n command gives you the total number of
  1659. bytes used by the files listed, that means how many |nbytes|n, period.  It
  1660. has nothing to do with how much space those files occupy on your disks.
  1661.                             |TAbout This Program|T
  1662.  
  1663. This "book" is dedicated to all the Computer Club members on the Prodigy
  1664. Online Service who always made me feel so good, by thanking me so heart-
  1665. ily for my help with their DOS problems.  (You know who you are!)  This
  1666. is my way of saying "You're welcome!"  And to all those who suggested,
  1667. told, or begged me to write this, I hope it meets your expectations.
  1668.  
  1669. The text is all my own, of course, but the Hypertext reader you're using
  1670. to read this, and the Hypertext compiler I used to put it together, is a
  1671. piece of shareware written by Derek Gitelson of Sansaska Systems.
  1672.  
  1673. It's really fun to write Hypertext.  Much more fun than just typing on a
  1674. word processor, because from the results, you can almost pretend that
  1675. you're actually "programming" or something.  Really, if you look at this
  1676. file with a browser, you'll see that it's just plain text with a few con-
  1677. trol characters like ||t and ||n to tell the compiler which words are to be
  1678. used as "targets", and which are to be highlighted as "hotspots" which
  1679. take you to the target when you put your cursor on them and hit <Enter>.
  1680.                            <page down> for more
  1681.                        About This Program continued
  1682. Well, once you have the text written and the control characters inserted,
  1683. the compiler takes care of all the hard work, doing all the indexing and
  1684. everything.  Then all you have to do is proofread it about six hundred
  1685. times.  Except for that part, it's fun.
  1686.  
  1687. So if you'd like to do a little Hypertext writing yourself, may I recom-
  1688. mend Mr. Gitelson's program, HeLPyoURSeLF.  You can probably find it on
  1689. your local BBS, or you can fill out his registration form that I've in-
  1690. cluded in the documentation for this program, and send the form along
  1691. with $20 + $2.50 shipping and handling, to Mr. Gitelson, and he'll send
  1692. you a registered copy of his program.  Or, you can just send it to me
  1693. along with your order for a registered copy of my "book", and I'll for-
  1694. ward it to him immediately.
  1695.  
  1696. Special thanks to Derek Gitelson for allowing me to license his Hypertext
  1697. program, to Cheryl Palardy for suggesting the title that I finally decid-
  1698. ed on, and to my "beta testers" (proofreaders), Chris Alumbaugh of Rock-
  1699. ford IL, Roy Patton of Dallas TX, Wayne Strang of Torrance CA, and my
  1700.                            <page down> for more
  1701.                        About This Program continued
  1702. mentor, Stan MacDonald of Omaha NE.
  1703.  
  1704. In case you've somehow lost the README.BAT file that came with this pro-
  1705. gram, here's how to register.  For this "book", send $20 + $4 for ship-
  1706. ping, and $1.30 for 6.5% sales tax if you're in Nebraska, to Kari Jack-
  1707. son, 3201 Monroe, Omaha NE, 68107 and tell me what size and density of
  1708. disk you need, and whether you want the printable text version as well as
  1709. the normal one.  To order the Hypertext compiler, send $20 + $2.50 for
  1710. shipping, and $1.40 for 7% sales tax if you're in California, to Sansaska
  1711. Systems, 3311 Concord Blvd, Concord CA, 94519 and of course let him know
  1712. also what size disk you need.  These prices are |ncurrent|n as of 8/04/91 but
  1713. are subject to change in the future.  Mr. Gitelson is offering this pro-
  1714. gram at $5 off the normal price, to purchasers of both this "book" and
  1715. his Hypertext program, so be sure to let him know that you're ordering it
  1716. "through" me so that he knows why you're only sending $20 instead of $25.
  1717.  
  1718.  
  1719.  
  1720.  
  1721.                    What Is an Installable |tDevice Driver|t?
  1722.  
  1723. The computer needs to have a |ndevice driver|n for all the device|1s that you
  1724. want it to be able to deal with.  The monitor, the keyboard, the disk
  1725. drives, the printer, the mouse, the modem, the expanded memory board,
  1726. these are just some of the devices that get attached to computers (other
  1727. than their users).  Well the computer has a lot of built-in device dri-
  1728. vers, such as the ones for CON, AUX, and PRN.  Devices that are not used
  1729. by all computers at all times need to have a piece of software loaded
  1730. during each bootup, that teaches the computer how to deal with these de-
  1731. vices.  And these pieces of software are called installable device dri-
  1732. vers.
  1733.  
  1734. You install a |ndevice driver|n into the computer's |nmemory|n by using a DEVIC|1E
  1735. or DEVICEHIGH command in your CONFIG.SYS file before you boot the compu-
  1736. ter.  Some of the device drivers that come with DOS are RAMDRIVE.SYS,
  1737. ANSI.SYS, DRIVER.SYS, HIMEM.SYS, and SMARTDRV.SYS.  Don't ever even think
  1738. about trying to use a file that has the .COM extension with a DEVICE com-
  1739. mand!  A file that has the .SYS extension is probably a |ndevice driver|n,
  1740.                            <page down> for more
  1741.                           Device Driver continued
  1742. but any other extension, don't do it unless the book tells you to!
  1743.  
  1744. All device drivers use up some of your memory.  Even the ones that have
  1745. switches that make them use extended or expanded |nmemory|n.  For example, if
  1746. you use the /E switch to put the RAMDRIVE.SYS |ndevice driver|n into |nextended|n
  1747. |nmemory|n, it's only the RAMdisk itself that goes into the |nextended|n |nmemory|n.
  1748. The |ndevice driver|n, which you could think of as the |nRAMdisk|n's drive con-
  1749. troller, is still in conventional |nmemory|n.  It's very small, however.  For
  1750. example, mine only uses up 1184 bytes.  It's well worth it.  Most device
  1751. drivers take up very small amounts of |nmemory|n.  But if you use a lot of
  1752. them all at once, it does add up.  That's why we like to have ways of
  1753. putting them into the Upper |nMemory|n Area, such as with DOS version 5.0's
  1754. DEVICEHIGH command.
  1755.  
  1756.  
  1757.  
  1758.  
  1759.  
  1760.  
  1761.                                 |TTrademarks|T
  1762.  
  1763. The following products are trademarks, registered trademarks, or copy-
  1764. rights of their respective companies:
  1765.           PC, XT, AT, PC-DOS, IBM--International Business Machines
  1766.           GW-BASIC, MS-DOS, Windows/386--Microsoft
  1767.           8086, 8088, |n286|n, |n386|n, 486, 586--Intel
  1768.           BROWSE, KEY-FAKE, PC Magazine--Ziff-Davis Publishing
  1769.           QRAM, QEMM, VIDRAM, DESQview/386--Quarterdeck Office Systems
  1770.           ASK, CAPSLOCK, HIDE, PC/Computing--Ziff-Davis Publishing
  1771.           VM/386--Intelligent Graphics
  1772.           CompuServe--H&R Block
  1773.           ANSI--American National Standards Institute
  1774.           Prodigy--Prodigy Services
  1775.           Zenith--Zenith Electronics
  1776.           Epson--Epson America
  1777.           Kaypro--Kaypro
  1778.           Hayes--Hayes Microcomputer Products
  1779.           WordStar--MicroPro International
  1780.                            <page down> for more
  1781.                            Trademarks continued
  1782.           UNIX--AT&T Bell Laboratories
  1783.           SpinRite--Gibson Research
  1784.           Norton Utilities--Peter Norton Computing
  1785.           PC Tools--Central Point Software
  1786.           4DOS--JP Software
  1787.           COMPAQ--COMPAQ Computer
  1788.           XMS--Lotus Development, Intel, Microsoft, and AST Research
  1789.           |nEMS|n, LIM--Lotus Development, Intel, and Microsoft
  1790.           PKZIP, PKUNZIP, PKZIPFIX--PKWARE
  1791.           TIMEPARK--Alpha Computer Service
  1792.           HISTORY--Bryan Higgins
  1793.           NANSI--Daniel Kegel
  1794.           MARK and RELEASE--TurboPower Software
  1795.           EXPLOSIV--Reidar Gresseth and Chris Hook
  1796.           ViruScan--McAfee Associates
  1797.           HeLPyoURSeLF--Sansaska Systems
  1798.           ALIAS, CED, and any other names, are from various other share-
  1799. ware/freeware/public domain/commercial software authors.
  1800.                            <page down> for more
  1801.                            Trademarks continued
  1802. If I've left anyone out, it certainly was not intentional, and I hope you
  1803. will forgive me, as well as letting me know so that I can correct the
  1804. problem in my next upgrade!
  1805.  
  1806.  
  1807.  
  1808.  
  1809.  
  1810.  
  1811.  
  1812.  
  1813.  
  1814.  
  1815.  
  1816.  
  1817.  
  1818.  
  1819.  
  1820.  
  1821.                          PLEASE IGNORE THIS PAGE!
  1822. |TSET|T|fSIMPLY1|f
  1823. |t". and .."|t|fSIMPLY1|f
  1824. |t286|t|fSIMPLY1|f
  1825. |t386|t|fSIMPLY1|f
  1826. |tANSI.SYS|t|fSIMPLY1|f
  1827. |tATTRIB|t|fSIMPLY1|f
  1828. |tAUTOEXEC.BAT|t|fSIMPLY1|f
  1829. |tAttributes|t|fSIMPLY1|f
  1830. |tBACKUP|t|fSIMPLY1|f
  1831. |tBBS|t|fSIMPLY1|f
  1832. |tCHDIR|t|fSIMPLY1|f
  1833. |tCHKDSK|t|fSIMPLY1|f
  1834. |tCMOS|t|fSIMPLY1|f
  1835. |tCPU|t|fSIMPLY1|f
  1836. |tCache|t|fSIMPLY1|f
  1837. |tDISKCOPY|t|fSIMPLY1|f
  1838. |tDirectory|t|fSIMPLY1|f
  1839. |tEMS|t|fSIMPLY1|f
  1840. |tEnvironment|t|fSIMPLY1|f
  1841. |tExpanded|t|fSIMPLY1|f
  1842. |tExtended|t|fSIMPLY1|f
  1843. |tHIMEM.SYS|t|fSIMPLY1|f
  1844. |tMemory|t|fSIMPLY1|f
  1845. |tRAM|t|fSIMPLY1|f
  1846. |tRMDIR|t|fSIMPLY1|f
  1847. |tShareware|t|fSIMPLY1|f
  1848. |tbytes|t|fSIMPLY1|f
  1849. |tconventional|t|fSIMPLY1|f
  1850. |tcurrent|t|fSIMPLY1|f
  1851. |tdefault|t|fSIMPLY1|f
  1852. |tdownloading|t|fSIMPLY1|f
  1853. |tfragmented|t|fSIMPLY1|f
  1854. |thigh|t|fSIMPLY1|f
  1855. |toverlay|t|fSIMPLY1|f
  1856. |tprotected mode|t|fSIMPLY1|f
  1857. |troot|t|fSIMPLY1|f
  1858. |tupper|t|fSIMPLY1|f
  1859. |TRESTORE|T|fSIMPLY2|f
  1860. |tASCII|t|fSIMPLY2|f
  1861. |tBoo|1t Disk|t|fSIMPLY2|f
  1862. |tDisks|t|fSIMPLY2|f
  1863. |tExecutable|t|fSIMPLY2|f
  1864. |tParameters|t|fSIMPLY2|f
  1865. |tRAMdisk|t|fSIMPLY2|f
  1866. |tReplaceable|t|fSIMPLY2|f
  1867. |tediting keys|t|fSIMPLY2|f
  1868. |TCOMMAN|1D|T|fSIMPLY4|f
  1869. |TECHO|T|fSIMPLY4|f
  1870. |TEMM386|T|fSIMPLY4|f
  1871. |TFC|T|fSIMPLY4|f
  1872. |TFIND|T|fSIMPLY4|f
  1873. |TGOTO|T|fSIMPLY4|f
  1874. |TLOADHIGH|T|fSIMPLY4|f
  1875. |TMORE|T|fSIMPLY4|f
  1876. |TMEM|T|fSIMPLY5|f
  1877. |TMODE|T|fSIMPLY5|f
  1878. |TPAUSE|T|fSIMPLY5|f
  1879. |TRENAME|T|fSIMPLY5|f
  1880. |TSELECT|T|fSIMPLY5|f
  1881. |TUNDELETE|T|fSIMPLY5|f
  1882. |TVERIFY|T|fSIMPLY5|f
  1883. |t*.*|t|fSIMPLY5|f
  1884. |tBoot|t|fSIMPLY5|f
  1885. |tCOMMAND.COM|t|fSIMPLY5|f
  1886. |tReboot|t|fSIMPLY5|f
  1887. |tWildcards|t|fSIMPLY5|f
  1888. |TPRINT|T|fSIMPLY6|f
  1889. |TSUBST|T|fSIMPLY6|f
  1890. |TTYPE|T|fSIMPLY6|f
  1891. |tCONFIG.SYS|t|fSIMPLY6|f
  1892. |tFAT|t|fSIMPLY6|f
  1893. |tKeyboard|t|fSIMPLY6|f
  1894. |tRedirection|t|fSIMPLY6|f
  1895. |tTSR|t|fSIMPLY6|f
  1896. |tdecimal|t|fSIMPLY6|f
  1897. |thexadecimal|t|fSIMPLY6|f
  1898. |TEXIST|T|fSIMPLY5|f
  1899. |TXCOPY|T|fSIMPLY2|f
  1900. |tBatch File|t|fSIMPLY7|f
  1901. |tPROMPT|t|fSIMPLY6|f
  1902. |TRAMDRIVE.SYS|T|fSIMPLY2|f
  1903. |TSMARTDRV.SYS|T|fSIMPLY4|f
  1904. |TDRIVER.SYS|T|fSIMPLY6|f
  1905. |TCOMSPEC|T|fSIMPLY1|f
  1906.